2002-07-16 Dietmar Maurer <dietmar@ximian.com>
[mono.git] / mono / jit / ChangeLog
1 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
2
3         * jit.c (mono_analyze_stack): adjust valuetype size for pinvoke calls
4
5 i2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
6
7         * x86.brg (freg): new rule freg: CALL_R8 (this, reg)
8
9 2002-07-10  Dietmar Maurer  <dietmar@ximian.com>
10
11         * emit-x86.c (arch_emit_prologue): added code to save LMF
12
13 2002-07-04  Dietmar Maurer  <dietmar@ximian.com>
14
15         * x86.brg (LOCALLOC): added fix from Zoltan Varga (for bug #27396) 
16
17 2002-07-05  Martin Baulig  <martin@gnome.org>
18
19         * debug.c (mono_debug_add_method): Fix a bug in the `begin_scope' and
20         `end_scope' calculations when linear scan register allocation is disabled.
21
22 2002-07-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23
24         * mono.c: removed the "RESULT: X" message.
25
26 2002-07-01  Dietmar Maurer <dietmar@ximian.com>
27
28         * exception.c (arch_get_call_finally): restore caller saved
29         register used by global reg. allocation when calling finally
30         handlers (fixes bug #24943).
31
32 2002-07-01  Dick Porter  <dick@ximian.com>
33
34         * jit.c (mono_jit_exec): Removed unneeded argument to
35         mono_runtime_run_main()
36
37 2002-06-28  Martin Baulig  <martin@gnome.org>
38
39         * debug.c (debug_generate_method_lines, mono_debug_add_method): Make methods
40         start on the nop instruction to make single-stepping into an already-JITed
41         method work.
42
43 2002-06-26  Martin Baulig  <martin@gnome.org>
44
45         * debug.c (mono_debug_source_location_from_address): Added
46         `guint32 *line_number' argument.  If it's not NULL, store the line number
47         there and return the file name without the line number.
48
49         * exception.c (ves_icall_get_trace): Fill in `sf->filename' and `sf->line'.
50         (ves_icall_get_frame_info): Likewise.
51
52 2002-06-25  Dick Porter  <dick@ximian.com>
53
54         * jit.c (mono_jit_exec): Pass the assembly to mono_runtime_run_main
55
56 2002-06-22  Martin Baulig  <martin@gnome.org>
57
58         * debug.c (mono_debug_source_location_from_address): Small fix, an
59         unsigned number can never be smaller than zero, make that check
60         actually work.
61
62 2002-06-19  Dietmar Maurer  <dietmar@ximian.com>
63
64         * exception.c (ves_icall_get_trace): new method to get the stack
65         trace from a Exception.
66
67 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
68
69         * jit.c (check_inlining): do not inline functions containing 
70         calls to stack query functions
71
72         * exception.c (ves_icall_get_frame_info): impl.
73
74 Tue Jun 18 10:21:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
75
76         * invoke.c: marshal simple arrays correctly.
77
78 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
79
80         * x86.brg: added inlined versions of Math.Sin, Math.Cos, Math.Sqrt
81
82         * jit.c (mono_analyze_stack): impl. STARG
83         (mono_analyze_stack): impl. LDARGA
84
85         * exception.c (arch_handle_exception): correctly restore register
86         values when unwinding the stack (fixes bug 25698)
87
88 2002-06-09  Martin Baulig  <martin@gnome.org>
89
90         * debug.c (mono_debug_open_image): For MONO_DEBUG_FORMAT_DWARF2_PLUS,
91         the `%s-debug.s' file is in the same directory than its assembly.
92
93 Sat Jun 1 13:24:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
94
95         * message.c, emit-x86.c: kill warnings.
96
97 2002-05-31  Dietmar Maurer  <dietmar@ximian.com>
98
99         * x86.brg: buf fix in REMOTE_STIND_OBJ
100         (mono_ldvirtftn): impl.
101         (mono_ldintftn): impl.
102         (mono_ldftn): impl.
103
104 Fri May 31 13:26:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
105
106         * mono.c: added --config command line option.
107
108 Fri May 31 12:34:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
109
110         * jit.c, jit.h: collect statistics about the number of basic blocks.
111
112 2002-05-31  Martin Baulig  <martin@gnome.org>
113
114         * debug.c (mono_debug_address_from_il_offset): New public function.
115         (mono_debug_add_method): Improved local variable info: correctly handle
116         variables in registers and their start/end scopes.
117
118 2002-05-30  Martin Baulig  <martin@gnome.org>
119
120         * debug-dwarf2.c (dwarf2_write_string): Use "0x%lx" as fprintf() format,
121         not "%p" which seems to be broken on Windows/mingw32.
122
123 2002-05-30  Dietmar Maurer  <dietmar@ximian.com>
124
125         * x86.brg (reg): bug fix in LOCALLOC
126
127         * mono.c (main): new switch --nointrinsic to disable memcpy opt.
128
129         * x86.brg: added block copy/init optimizations from 
130         Serge (serge@wildwestsoftware.com)
131  
132 Thu May 30 14:13:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
133
134         * invoke.cs: lookup P/Invoke method address only when needed.
135
136 2002-05-29  Dietmar Maurer  <dietmar@ximian.com>
137
138         * x86.brg: bug fix in REMOTE_STIND_OBJ
139
140         * invoke.c (arch_create_native_wrapper): handle pointers to value types
141
142         * helpers.h: use mono_ prefix for all functions
143
144         * jit.c (mono_analyze_stack): fixed SIZEOF
145
146         * x86.brg: impl. LOCALLOC, INITBLK
147
148 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
149
150         * x86.brg: impl. CKFINITE 
151
152         * jit.c (mono_analyze_stack): impl. CEE_CALLI
153
154         * x86.brg (JMP): impl. JMP opcode
155
156 2002-05-27  Dietmar Maurer  <dietmar@ximian.com>
157
158         * jit.c (mono_cfg_new): reserve additional space to store ESP when
159         calling finally handlers.
160
161         * exception.c (arch_get_call_finally): save ESP before calling
162         finally handler.
163
164         * helpers.c (map_arg_type): move some generic helper function into
165         this file.
166
167         * mono.c (usage): new option --breakonex 
168
169         * exception.c (arch_exc_is_caught): only return FALSE if really
170         unhandled.
171
172         * jit.c (mono_thread_abort): free jit_tls
173
174 2002-05-24  Dietmar Maurer  <dietmar@ximian.com>
175
176         * x86.brg (stmt): use memmove to cope with overlapping
177         blocks. This is not required by the specs, so we can remove it
178         later if it turns out to be too slow (and use memcpy).
179
180         * jit.c (mono_analyze_stack): moved const. folding from x86.brg
181
182         * x86.brg: CPBLK impl.
183
184         * emit-x86.c (tree_emit): modified to support 3 nonterminals per
185         rule (used for CPBLK).
186
187 Thu May 23 18:43:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
188
189         * mono.c: remove generated code from hash when benchmarking/testing
190         method compilation.
191         * invoke.cs: special case string ctors.
192
193 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
194
195         * *.c: code cleanups - tried to separate architecture dependent things. 
196
197 2002-05-23  Martin Baulig  <martin@gnome.org>
198
199         * debug.c (mono_debug_open): Don't call mono_debug_add_image().
200         (mono_debug_write_symbols): Only recreate the symbol file if
201         necessary.
202
203         * debug-private.h (MonoDebugHandle): Added `dirty' flag.
204
205         * mono.c (main): Call mono_debug_add_image() here.
206
207         * jit.c (mono_thread_abort): If we have debugging support, call
208         mono_debug_make_symbols() and G_BREAKPOINT().
209
210         * exception.c (arch_handle_exception): Don't G_BREAKPOINT() if we get
211         an unhandled exception.
212
213 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
214
215         * delegate.c: move the thread pool to metadata/threadpool.c, code
216         cleanup.
217
218 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
219
220         * exception.c (arch_exc_is_catched): impl. MS like exception
221         handling (added a check for unhandled exceptions)
222
223 2002-05-22  Martin Baulig  <martin@gnome.org>
224
225         * debug-dwarf2-plus.c (mono_debug_open_assembly_dwarf2_plus): Only run
226         the assembler if necessary, ie. the assembler file is newer than the
227         symbol file or the symbol file does not exist.
228
229         * debug.c: Added "update_on_exit" argument to recreate the symbol file
230         when the JIT exists.
231
232         * debug-dwarf2.c: Produce assembler code which is free of comments and
233         extra whitespaces so that it's suitable for `as -f'.
234
235 2002-05-22  Martin Baulig  <martin@gnome.org>
236
237         * debug-dwarf2.c (dwarf2_write_section_end): Removed.  This is not needed
238         and not supported by all assemblers.
239         (dwarf2_write_2byte): Use ".word" instead of ".2byte" since ".2byte" is a
240         GNU extension.
241
242         * mono.c (--debug): Small fix in the argument parsing.
243
244 2002-05-22  Martin Baulig  <martin@gnome.org>
245
246         * debug.c: Added "dont_assemble" and "dont_precompile" argument for dwarf-plus.
247
248         * mono.c: Applied patch from Miguel:
249         (--debug): This is now a `--debug=[FORMAT]' argument where FORMAT defaults
250         to dwarf-plus.
251
252 2002-05-21  Martin Baulig  <martin@gnome.org>
253
254         * debug.c (mono_debug_source_location_from_address): Added support for the
255         dwarf2-plus format.
256
257 2002-05-21  Martin Baulig  <martin@gnome.org>
258
259         * debug.c (mono_debug_source_location_from_address): New function.
260         (mono_debug_il_offset_from_address): New function.
261
262         * exception.c (arch_handle_exception): If we have debugging support, include
263         information about the source location and IL offset in the stack trace.
264
265 2002-05-21  Dietmar Maurer  <dietmar@ximian.com>
266
267         * jit.c (mono_analyze_stack): LDARG uses 16bit argument (fix bug
268         #25058)  
269
270         * x86.brg (stmt): removed unnecessary assertion
271
272         * jit.c (check_inlining):  we cant inline throw instructions
273         (because it breaks some basic block requirements)
274
275 2002-05-21  Martin Baulig  <martin@gnome.org>
276
277         * debug-private.h (MonoDebugFlags): New enum typedef.
278
279         * debug.c (mono_debug_open): Added a few useful arguments.  See the manpage
280         for details.
281
282 2002-05-21  Martin Baulig  <martin@gnome.org>
283
284         * debug.c (mono_debug_open_file): Renamed to mono_debug_open(), now takes
285         a `MonoAssembly *' argument instead of a `char *filename' one.  Also added
286         `const char **args' argument.
287
288         * mono.c (mono_jit_assembly): Renamed to mono_jit_compile_image(), added
289         `int verbose' argument and made it public.
290         (mono_jit_compile_class): New public function,  moved the code to compile
291         all methods in a class here from main().
292         (--compile): The argument can now also be an image (in `@imagename' format).
293         Updated documentation for this command line argument.
294         (--precompile): New command line argument to precompile an image/class/method
295         before executing the main app.  This argument can be given multiple times.
296         (--break): Renamed the "--debug" command line argument to "--break".
297         (--debug): New command line argument to specify the debugging format.
298         (--stabs, --dwarf, --dwarf-plus): Removed, obsoleted by "--debug".
299         (--debug-args): New command line argument.  This is a comma-separated list of
300         additional arguments for the symbol writer.
301         (usage): Beautified the help text a bit.
302
303         * debug-dwarf2-plus.c (mono_debug_open_assembly_dwarf2_plus): Use the new
304         public mono_jit_compile_image() function rather than duplication this
305         functionality here.
306
307 2002-05-21  Martin Baulig  <martin@gnome.org>
308
309         * debug-dwarf2-plus.c: This is now working again :-)
310
311         * debug.c (mono_debug_open_file): When using MONO_DEBUG_FORMAT_DWARF2_PLUS,
312         we create two MonoDebugHandles: one for MONO_DEBUG_FORMAT_DWARF2_PLUS and
313         one for the fallback MONO_DEBUG_FORMAT_DWARF2.
314
315 2002-05-21  Martin Baulig  <martin@gnome.org>
316
317         * jit.c (mono_debug_handle): Removed this global variable.
318
319         * debug.c (mono_debug_close): Removed.
320         (mono_debug_cleanup): New global function.
321         (mono_debug_add_image): New global function.
322         (mono_debug_handle_from_class): New global function.
323         (mono_debug_write_symbols): New global function.
324         (mono_debug_add_type): Removed `MonoDebugHandle *' argument.
325         (mono_debug_add_method): Likewise.
326
327 2002-05-21  Martin Baulig  <martin@gnome.org>
328
329         Work around a hard-to-fix bug in GDB and create a single dwarf/stabs
330         file for all assemblies.  Currently, the JIT doesn't put all methods
331         from a single assembly into a continuous region of memory.  We were
332         previously creating valid DWARF 2 files for this, but unfortunately
333         GDB's symbol tables get messed up when it reads more than one such file.
334
335         * debug-private.h (AssemblyDebugInfo): Moved `f', `producer_name',
336         `next_idx', `methods', `type_hash', `source_files' and `format'
337         into the MonoDebugHandle.
338
339         * debug.c (mono_debug_get_type): This now operates on the MonoDebugHandle,
340         not on the AssemblyDebugInfo.
341         (mono_debug_open_file): Moved some stuff here from mono_debug_open_assembly().
342
343         * debug-dwarf2.c (mono_debug_write_assembly_dwarf2): Renamed into
344         mono_debug_write_dwarf2().
345         (mono_debug_open_assembly_dwarf2): Removed.
346         (mono_debug_close_assembly_dwarf2): Removed.
347
348         * debug-stabs.c (mono_debug_write_assembly_stabs): Renamed into
349         mono_debug_write_stabs().
350         (mono_debug_open_assembly_stabs): Removed.
351         (mono_debug_close_assembly_stabs).
352
353         * debug-dwarf2-plus.c: This is currently broken. :-(
354
355 2002-05-20  Martin Baulig  <martin@gnome.org>
356
357         * debug.h (mono_debug_format): New global variable.
358         (MonoDebugFormat): Added MONO_DEBUG_FORMAT_NONE.
359
360         * debug-private.h (MonoDebugHandle): Added `objfiles' field which is
361         a whitespace separated list of symbol files.
362         (AssemblyDebugInfo): Added `objfile' filed which is the name of the
363         symbol file.
364
365         * mono.c (main): Pass the assembly file name to mono_debug_open_file().
366
367         * debug.c (mono_debug_make_symbols): Link all symbol files into a big
368         `<assemblyname>.o' symbol file.
369
370 2002-05-20  Martin Baulig  <martin@gnome.org>
371
372         * debug.c (debug_load_method_lines): Check whether the assembly file
373         is newer than the IL file and recreate the IL file if necessary.
374
375 2002-05-20  Miguel de Icaza  <miguel@ximian.com>
376
377         * mono.c Updated copyright years. 
378
379 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
380
381         * mono.c (usage): Relayout command line options.
382
383 2002-05-17  Dietmar Maurer  <dietmar@ximian.com>
384
385         * x86.brg (reg): fixed array bound check
386
387         * emit-x86.c (enter_method): print method signature
388
389         * exception.c (arch_handle_exception): set trace info before we
390         call handlers.
391
392 2002-05-16  Dietmar Maurer  <dietmar@ximian.com>
393
394         * jit.c (mono_find_final_block): make it work with mcs
395
396         * x86.brg: buf fix. if exception variable is allocated to a register. 
397
398         * jit.c (mono_find_final_block): bug fix.
399
400 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
401
402         * delegate.c (arch_end_invoke): fix bug #24653, simplified the
403         code using new runtime_invoke feature.
404
405         * jit.c (mono_analyze_flow): try blocks are followed by handler
406         blocks, so we need to add all handler blocks as succesors.
407         (mono_thread_start_cb): set end_of_stack
408
409         * exception.c (arch_handle_exception): correctly save/restore caller
410         saved regs.
411
412         * emit-x86.c (arch_emit_prologue): correctly save/restore caller
413         saved regs.
414
415         * jit.c (mono_cfg_new): allocate space for caller saved registers.
416
417 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
418
419         * jit.c: only use one TLS slot to store jit data
420
421         * exception.c (arch_handle_exception): print function signature,
422         use thread relative end_of_stack
423
424 2002-05-13  Dietmar Maurer  <dietmar@ximian.com>
425
426         * jit.c (OPT_BOOL): new. opt. for boolean variables - we simply
427         store them as 32 bit integers.
428         (mono_analyze_stack): we need to generate a temporary var for
429         SHL/SHR because the tree allocator can fail otherwise 
430
431         * exception.c (arch_handle_exception): EIP now points to the call
432         instruction, not to the instruction after the call. This fixes the
433         bug reported by Linus Upson (tests/exception8.cs)
434
435 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
436
437         * jit.c (mono_analyze_flow): always allocate the forest array
438         (mono_stack_duplicate_used_var): impl.
439         (mono_copy_used_var): impl.
440
441         * x86.brg: bug fix in SHR/SHL
442
443         * emit-x86.c (arch_emit_prologue): check if live_in_set != NULL
444
445 2002-05-11  Sergey Chaban <serge@wildwestsoftware.com>
446
447         * mono.c: new --fast-iconv command line option
448         to enable fast FP-to-integer conversion code.
449         * jit.c, jit.h: added global variable to store state
450         for the above option. This optimization is disabled
451         by default.
452         * x86.brg: added code to emit fast FP-to-integer
453         conversion sequences.
454
455 2002-05-10  Dan Lewis  <dihlewis@yahoo.co.uk>
456
457         * emit-x86.c: simple definite assignment analysis optimization for
458         uninitialized locals.
459
460 Fri May 10 15:43:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
461
462         * x86.brg, emit-x86.c: patch the branch targets with x86_patch().
463
464 2002-05-10  Dietmar Maurer  <dietmar@ximian.com>
465
466         * linear-scan.c (mono_update_gen_set): improvement/bug fix
467
468         * x86.brg: added additional rules to handle global allocated registers
469
470         * mono.c (usage): the option is called --nols, and it dissables
471         linear scan.
472
473         * x86.brg: better LDIND_R4, LDIND_R8, STIND_R4, STIND_R8
474
475 2002-05-09  Dietmar Maurer  <dietmar@ximian.com>
476
477         * linear-scan.c: linear scan reg. allocation and data flow analysis
478         use Paolo's great bitset implementation.
479
480         * jit.c (arch_allocate_var): add live range info
481         (mono_cfg_add_successor): create list of successors for basic
482         blocks.
483
484         * mono.c (main): new option --ls to enable linear scan
485
486         * exception.c (arch_handle_exception): print instruction pointer
487         relative to method start address.
488
489         * jit.c (mono_print_ctree): print register number if locals are
490         allocate in registers.
491
492         * emit-x86.c (arch_emit_prologue): initialize reg. allocated locals
493         (arch_emit_epilogue): take care when restoring save registers,
494         because the stack pointer may has changed.
495
496         * x86.brg: s/VAROFFSET/VARINFO/
497         modified to support global register allocation
498
499 Mon May 6 15:38:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
500
501         * jit.h, jit.c, emit-x86.c: x86 cpu detection code from Sergey.
502
503 2002-05-03  Sergey Chaban <serge@wildwestsoftware.com>
504
505         * x86.brg: more coni4 optimizations
506         MUL: generate optimized code for some consts other
507         than powers of 2 (hardcoded impl. for 3, 5, 10 etc.);
508         DIV_UN: multiply with reciprocal instead of dividing;
509
510 2002-05-03  Dietmar Maurer  <dietmar@ximian.com>
511
512         * x86.brg: use VAROFFSET macro
513
514         * emit-x86.c (tree_emit): allocate space for spilled regs in
515         activation frame instead of pushing them to the stack.
516
517         * x86.brg: replace BXX with CBRANCH/COMPARE
518         replaced CXX CSET/COMPARE
519
520         * emit-x86.c (arch_allocate_regs): improved register allocation
521
522 2002-05-02  Dietmar Maurer  <dietmar@ximian.com>
523
524         * delegate.c (mono_delegate_cleanup): signal semaphore in order to
525         exit threads.
526
527 2002-04-30  Dick Porter  <dick@ximian.com>
528
529         * mono.c (main): Tell glib to not abort when g_log() etc print
530         recursively
531
532 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
533
534         * x86.brg: opt. LDELEMA impl.
535         (MUL) use shift when possible.
536         (DIV) use shift when possible.
537         impl. various opt. with coni4
538
539         * exception.c (arch_handle_exception): use ctx->SC_EBP in
540         end_of_stack check as suggested by Linus Upson <linus@linus.com>
541
542 2002-04-29  Dietmar Maurer  <dietmar@ximian.com>
543
544         * x86.brg (LDLEN, UNBOX): removed unnecessary NULL check.  
545
546         * exception.c: included the Freebsd patch from Sandro Tolaini
547         <sandro@focuseek.com>
548
549 Mon Apr 29 15:18:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
550
551         * mono.c, jit.c: use mono_runtime_run_main ().
552
553 2002-04-29  Dietmar Maurer  <dietmar@ximian.com>
554
555         * jit.c (mono_analyze_stack): dont call methods on Object with
556         METHOD_ATTRIBUTE_FINAL directly because it breaks remoting.
557
558         * x86.brg: added more CONV_U rules
559
560         * jit.c (mono_analyze_stack): avoid recursive call of virtual
561         methods: fixes Bug #23778 
562         (mono_analyze_stack): emit right CONV_UX opcodes: fixes bug 23547
563
564         * exception.c (arch_handle_exception): only g_assert(cleanup) if
565         we really need it.
566
567 2002-04-27      Patrik Torstensson <patrik.torstensson@intel.com>
568
569         * x86.brg: fixed bug in CONV_I8 (invalid stack correction)
570
571 2002-04-27  Martin Baulig  <martin@gnome.org>
572
573         * jit.h (MonoFlowGrap): Renamed `epilogue_begin' to `epilogue_end',
574         there's already `epilog' so we don't need `epilogue_begin'.
575
576         * debug.c (mono_debug_add_method): Use `cfg->epilogue_end' to get the
577         size of the method's code.
578
579 2002-04-25  Martin Baulig  <martin@gnome.org>
580
581         * debug-dwarf2.c (dwarf2_write_string_type): Reflect latest MonoString
582         changes.
583
584 2002-04-25  Dietmar Maurer  <dietmar@ximian.com>
585
586         * x86.brg: enable stmt: STIND_I4 (addr, coni4) again,
587         added CONV_OVF_I4 (fix bug #23808)
588
589 2002-04-23  Dietmar Maurer  <dietmar@ximian.com>
590
591         * x86.brg: code cleanup - use x86_patch ()
592
593         * jit.c (mono_analyze_stack): only use MB_TERM_CHECKTHIS when necessary
594         (mono_analyze_stack): don't store constants in temp. variables for CEE_DUP
595
596         * x86.brg (stmt): removed stmt: STIND_I4 (addr, coni4) rule
597         because it slows down performance.
598
599 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
600
601         * emit-x86.c: enter_method handles 8-byte aligned parameters.
602
603 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
604
605         * jit,h, jit.c, x86.brg: NEWOBJ_SPEC and NEWARR_SPEC terminals for
606         non-shared code.
607
608 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
609
610         * jit.c (check_inlining): added statistics about inlineing
611
612         * mono.c (usage): new switch --noinline to disable inlining
613
614         * jit.c (mono_analyze_stack): added a check for (this!=NULL) if we
615         inline methods (to keep semantics)
616
617         * x86.brg: added constant folding for inegers 
618
619         * emit-x86.c (tree_allocate_regs): handle the special case when
620         chain rules need a register.
621
622 2002-04-19  Dietmar Maurer  <dietmar@ximian.com>
623
624         * invoke.c (arch_create_native_wrapper): do not save LMF for Strings
625
626         * jit.c (check_inlining): better inlining support
627
628 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
629         
630         * x86.brg: LDLEN uses max_length instead of bounds[0]
631         * jit.c: support for new szarray format
632
633 2002-04-18  Dietmar Maurer  <dietmar@ximian.com>
634
635         * jit.c (check_inlining): added inlining support
636
637 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
638
639         * x86.brg: optimized version of castclass and isinst
640
641 Wed Apr 17 12:34:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
642
643         * emit-x86.c, invoke.c: track time spent compiling.
644
645 Wed Apr 17 10:58:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
646
647         * emit-x86.c, invoke.c: call profile callbacks if needed.
648         * jit.c, jit.h, mono.c: add --profile command line option.
649
650 2002-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
651
652         * jit.h: included mono/io-layer/io-layer.h to avoid breaking
653         compilation under windows when upgrading mingw and w32api to 
654         version 1.3 (thanks Dick!).
655
656 2002-04-15  Patrik Torstensson <patrik.torstensson@labs2.com>
657
658         * jit.c: changed the array icalls to use full names
659
660 2002-04-15  Dietmar Maurer  <dietmar@ximian.com>
661
662         * x86.brg: check the this pointer before calling
663         non-virtual functions
664
665         * emit-x86.c (arch_emit_prologue): initialize local vars.
666
667         * x86.brg: removed incredible clumsy code
668
669 2002-04-13  Martin Baulig  <martin@gnome.org>
670
671         * debug-dwarf2.c (dwarf2_write_variable_location): New static func to write
672         the location of a variable.
673         (dwarf2_write_variable, dwarf2_write_parameter): Take a MonoDebugVarInfo
674         instead of a stack offset and use dwarf2_write_variable_location() to write
675         the location.
676
677 2002-04-13  Martin Baulig  <martin@gnome.org>
678
679         * debug.c, debug-stabs.c, debug-dwarf2.c: Reflect latest debug-symfile.h
680         API changes.
681
682 2002-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
683
684         * Makefile.am: use of the new '-s' option in monoburg.
685
686 2002-04-12  Martin Baulig  <martin@gnome.org>
687
688         * debug-dwarf2.c (dwarf2_write_variable): Emit info about the variable's
689         lifetime.
690
691 2002-04-10  Sergey Chaban <serge@wildwestsoftware.com>
692         * win32-exception: added Win32 SEH exception filter that translates
693         CONTEXT to sigcontext;
694
695         * jit.c: added Win32 SEH init/reset calls, compute sigcontext address
696         in a platfrom-dependent way;
697
698         * jit.h: use win32-exception instead of signal if PLATFORM_WIN32
699         and avoid io-layer includes;
700
701         * delegate.c: do not include io-layer stuff if PLATFORM_WIN32
702         is defined;
703
704 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
705
706         * delegate.c (arch_end_invoke): restore output arguments
707
708 Mon Apr 8 17:16:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
709
710         * jit.c: call mono_runtime_init ().
711
712 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
713
714         * jit.c (mono_jit_cleanup): added more statistics
715
716         * invoke.c (arch_create_native_wrapper): special case EndInvoke -
717         we need to pass the MonoMethod pointer as first argument.
718
719         * delegate.c (mono_async_invoke): notify all listeners, not only a
720         single one.
721         (arch_end_invoke): we now pass a MonoMethod as first parameter and
722         use arch_method_call_message_new() to access the stack.
723         (arch_end_invoke): wait until we really finished processing
724         (async_invoke_abort): notify all listeners, not only a
725         single one.
726
727 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
728
729         * message.c (arch_return_value): impl.
730         (arch_method_return_message_restore): consider delegate BeginInvoke
731
732         * jit.c: removed jit_exec_main()
733
734         * delegate.c (arch_begin_invoke): use the message builder to make
735         it architecture independent - still needs more cleanup.
736
737 2002-04-05  Dietmar Maurer  <dietmar@ximian.com>
738
739         * delegate.c (mono_delegate_ctor): support for transparent proxy
740
741         * x86.brg (freg): bug fix in CONV_R* opcodes
742
743 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
744
745         * message.c: added documentation
746
747 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
748
749         * mono.c (main): use --trace instead of --trace-calls
750
751         * x86.brg: impl. REMOTE_STIND_XX
752
753         * message.c (mono_store_remote_field): impl.
754
755 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
756
757         * x86.brg: impl. REMOTE_FIELD (load fields of remote objects)
758
759         * message.c (mono_load_remote_field): impl.
760
761         * jit.c (mono_analyze_stack): only call marshalbyref methods
762         through the vtable.
763         (mono_analyze_stack): consider marshalbyref objects in LDFLD
764
765 Fri Mar 29 16:00:27 CET 2002 Paolo Molaro <lupus@ximian.com>
766
767         * x86.brg: kill pointer arithmetric.
768
769 2002-03-28  Martin Baulig  <martin@gnome.org>
770
771         * jit.c (mono_debug_insert_breakpoint): New global variable.
772         (mono_debug_last_breakpoint_address): New global variable.
773
774         * emit-x86.c (arch_compile_method): If `mono_debug_insert_breakpoint' is
775         non-zero, insert a breakpoint; if it's positive, decrement it when done.
776         Set `mono_debug_last_breakpoint_address' to the address of the last inserted
777         breakpoint.
778
779         * debug.h: Provide external declaration of `mono_debug_insert_breakpoint' and
780         `mono_debug_last_breakpoint_address', also documented them here.
781
782 2002-03-28  Martin Baulig  <martin@gnome.org>
783
784         * debug-private.h (MonoDebugHandle): Renamed `format' to `default_format'.
785         (AssemblyDebugInfo): Added `format'.
786
787         * debug.c: Use the AssemblyDebugInfo's `format' field to determine the format,
788         this allows us choose the format on a per-assembly basis.
789         (mono_debug_open_assembly): When using MONO_DEBUG_FORMAT_DWARF2_PLUS, fall back
790         to MONO_DEBUG_FORMAT_DWARF2 if the symbol file does not exist, but the IL file
791         exists.
792         (debug_generate_method_lines): Generate correct IL offsets.
793
794 2002-03-28  Martin Baulig  <martin@gnome.org>
795
796         * jit.h (MonoFlowGraph): Added `prologue_end' and `epilogue_start' fields.
797
798         * emit-x86.c (arch_compile_method): Set prologue_end and epilogue_start.
799
800         * debug-private.h (DebugMethodInfo): Renamed `frame_start_offset' to
801         `prologue_end_offset', added `epilogue_begin_offset' and `last_line'.
802
803         * debug.c (debug_generate_method_lines): Don't return if we don't have line
804         numbers, we still need to generate the IL offsets here. Emit line numbers
805         for `prologue_end_offset' (the first line of actual code) and 
806         `epilogue_begin_offset' (the line of the method's closing brace).
807         Don't crash if cfg->bblocks [i].forest is NULL.
808         (mono_debug_add_method): Don't crash if we don't have line numbers.
809         Initialize the newly added fields.
810
811         * debug-stabs.c: Record first and last line, emit filename info at the
812         beginning of the stab file, gdb ignores the types otherwise.
813
814         * debug-dwarf2.c: Use the new prologue_end_offset instead of guessing it;
815         emit line number info for the first and last line.
816
817 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
818
819         * invoke.c (arch_create_delegate_trampoline): impl.
820
821 Thu Mar 28 11:58:53 CET 2002 Paolo Molaro <lupus@ximian.com>
822
823         * Makefile.am, mono.c, jit.h, jit.c: build the libmono library
824         with the jit runtime to easy embedding. main() is moved to mono.c, now.
825         * jit.c: use opcode names from libmetadata.
826         * debug.h, debug.c: constify char* argument.
827
828 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
829
830         * jit.c: catching SIGSEGV again, added proxy support
831
832 2002-03-21  Dietmar Maurer  <dietmar@ximian.com>
833
834         * delegate.c (mono_delegate_init): remove unused worker threads
835
836 2002-03-27  Mike Kestner <mkestner@speakeasy.net>
837
838         * delegate.c (arch_get_delegate_invoke): malloc a bigger area
839
840 Tue Mar 26 19:54:45 CET 2002 Paolo Molaro <lupus@ximian.com>
841
842         * jit.c: remove glib mem vtable code.
843
844 2002-03-26  Martin Baulig  <martin@gnome.org>
845
846         * debug-dwarf2.c (write_method_lines_dwarf2): Don't generate method
847         lines if we don't have line number information.
848         (write_method_dwarf2): Use `minfo->method_info.this_offset' instead
849         of hardcoding 8.
850
851         * debug-stabs.c (write_method_stabs): Don't generate method lines if
852         we don't have line number information. Use `minfo->method_info.this_offset'
853         instead of hardcoding 8.
854
855         * debug.c (debug_generate_method_lines): Don't crash if we don't have
856         line number information.
857         (mono_debug_open_assembly): Don't generate line numbers for
858         MONO_DEBUG_FORMAT_DWARF2_PLUS.
859         (mono_debug_add_method): Don't store the 'this' offset in `param_offsets',
860         but it in the new `this_offset' field.
861         
862 Mon Mar 25 13:03:35 CET 2002 Paolo Molaro <lupus@ximian.com>
863
864         * debug.c (debug_generate_method_lines): Use correct addresses for
865         record_il_offset().
866
867 Mon Mar 25 13:03:35 CET 2002 Paolo Molaro <lupus@ximian.com>
868
869         * jit.c: do not set the glib mem vtable anymore.
870         * Makefile.am: link to libmonoutils.
871
872 2002-03-25  Martin Baulig  <martin@gnome.org>
873
874         * debug.h (mono_debug_make_symbols): Documented this function.
875
876 2002-03-24  Martin Baulig  <martin@gnome.org>
877
878         * debug.c (mono_debug_add_method): Include the `this' offset in
879         the `minfo->method_info.param_offsets' array.
880
881 2002-03-23  Martin Baulig  <martin@gnome.org>
882
883         * x86.brg (lreg: CONV_I8 (reg)): X86_XOR modifies the flags, so we need
884         to do it before the X86_CMP.
885         (reg: CLT (lreg, lreg)): Use correct x86_branch8() targets.
886         (reg: CLT (lreg, lreg)): Likewise.
887         (reg: CLT_UN (lreg, lreg)): Likewise.
888         (reg: CLT_UN (lreg, lreg)): Likewise.
889         (reg: CGT (lreg, lreg)): Likewise.
890         (reg: CGT (lreg, lreg)): Likewise.
891         (reg: CGT_UN (lreg, lreg)): Likewise.
892         (reg: CGT_UN (lreg, lreg)): Likewise.
893
894 2002-03-23  Martin Baulig  <martin@gnome.org>
895
896         * debug-private.h (AssemblyDebugInfo): Added `_priv'.
897
898         * debug-dwarf2-plus.c
899         (mono_debug_open_assembly_dwarf2_plus): Open the symbol file here.
900         (mono_debug_close_assembly_dwarf2_plus): Close the symbol file here.
901         (mono_debug_write_assembly_dwarf2_plus): Only call
902         mono_debug_update_symbol_file() here.
903
904 Thu Mar 21 17:35:48 CET 2002 Paolo Molaro <lupus@ximian.com>
905
906         * jit.c: inter strings before executing a method.
907         Do not intern command line arguments anymore.
908
909 2002-03-21  Martin Baulig  <martin@gnome.org>
910
911         * debug.h (MonoDebugFormat): Added MONO_DEBUG_FORMAT_DWARF2_PLUS.
912
913         * debug-dwarf2-plus.c: This debugging format reads a symbol file which has
914         been created by MCS and fills in all machine dependent stuff.
915
916         * debug-private.h (DebugMethodInfo): Added `MonoDebugMethodInfo method_info',
917         removed everything which is already in MonoDebugMethodInfo.
918
919         * debug.c (debug_generate_method_lines): Generate the MonoILOffsetInfo array.
920         (mono_debug_make_symbols): Don't open the file or call as, this is done in the
921         backend code.
922
923         * jit.c (main): Added "--dwarf-plus" command line option to use the new
924         MONO_DEBUG_FORMAT_DWARF2_PLUS debugging format.
925
926 2002-03-21  Dietmar Maurer  <dietmar@ximian.com>
927
928         * jit.c (usage): new option to specify maximum number of worker threads
929         (mono_analyze_stack): avoid cyclic dependency in CEE_LDFTN
930
931         * delegate.c (async_invoke_abort): added support for asynchronous exceptions
932         (arch_get_async_invoke): notify listeners before we call the
933         asynchronous callback
934
935 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
936
937         * delegate.c (async_invoke_thread): support for domains
938         (async_invoke_thread): create workers only when needed
939
940 2002-03-19  Dietmar Maurer  <dietmar@ximian.com>
941
942         * delegate.c (async_invoke_thread): initial support for BeginInvoke/EndInvoke
943
944 2002-03-18  Dietmar Maurer  <dietmar@ximian.com>
945
946         * x86.brg: impl. lreg: XOR (lreg, lreg)
947         impl. REM (freg, freg)
948
949 2002-03-17  Martin Baulig  <martin@gnome.org>
950
951         * debug.c (mono_debug_open_assembly): Call mono_debug_get_type() on all
952         base types.
953
954         * debug-dwarf2.c: Added support for strings and arrays.
955
956 2002-03-17  Martin Baulig  <martin@gnome.org>
957
958         * debug.c (mono_debug_get_type): Recursively call this for all function members
959         of a class type.
960         (mono_debug_add_method): Don't mangle function names, this must be done by the
961         debugger backend if the debugging format needs mangled names.
962
963         * debug-dwarf2.c: Improved support for classes, added member functions.
964
965 2002-03-16  Martin Baulig  <martin@gnome.org>
966
967         * debug.c (mono_debug_get_type): Recursively call this for all members and
968         parent classes of a class type.
969
970         * debug-dwarf2.c: Added basic support for classes. Set source language to C++
971         since GDB doesn't like Java very much.
972
973 2002-03-16  Martin Baulig  <martin@gnome.org>
974
975         * debug-dwarf2.c: Added support for enums.
976
977 2002-03-15  Martin Baulig  <martin@gnome.org>
978
979         * debug.c (mono_debug_get_type): Recursively call this for all members
980         of a struct type.
981
982         * debug-dwarf2.c: Added support for structs.
983
984 2002-03-15  Dietmar Maurer  <dietmar@ximian.com>
985
986         * emit-x86.c (arch_create_jit_trampoline): adapt save/restore LMF
987         to new MonoLMF layout
988
989 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
990
991         * emit-x86.c (arch_create_native_wrapper): new code to generate
992         wrappers for calling native functions.
993         (arch_create_native_wrapper): free allocated strings
994         (arch_handle_exception): made mono_jit_info_table domain dependent
995
996 2002-03-14  Martin Baulig  <martin@gnome.org>
997
998         * debug.c (MonoDebugFormat): New public enums specifying which debugging
999         format to use.
1000         (mono_debug_open_file): Added MonoDebugFormat argument.
1001         (mono_debug_make_symbols): Don't take an argument to make it easier to call
1002         this function from GDB. It's now safe to call this function multiple times;
1003         it'll always write a complete debugging file.
1004
1005         * debug.c: Splitted this file into a general part which remains in this file
1006         and the debugging format specific parts debug-stabs.c and debug-dwarf2.c.
1007         All public functions now call a corresponding format specific function.
1008
1009         * debug.c: The following changes are private to debug.c:
1010         (AssemblyDebugInfo, MonoDebugHandle): Moved declarations to debug-private.h.
1011         (record_line_number, debug_generate_method_lines): New private functions.
1012         (mono_debug_open_ass): Renamed to mono_debug_open_assembly; this function now
1013         calls a debugging-format-specific function (mono_debug_open_assembly_stabs or
1014         mono_debug_open_assembly_dwarf2).
1015         (mono_debug_make_symbols): Calls mono_debug_write_assembly_stabs/dwarf2(). It's
1016         now safe to call this function multiple times.
1017         (mono_debug_get_type): New public function. This takes a `MonoClass *' and
1018         returns an unique index for this type. It's used to ensure that we only write
1019         each class once to the debugging file.
1020         (mono_debug_add_method, mono_debug_add_type): Store all the data in an internal
1021         data structure, but don't directly write to the debugging file. This is done
1022         later from mono_debug_write_assembly().
1023
1024         * jit.c (main): Added "--dwarf" command line argument to generate DWARF 2
1025         debugging output. Call mono_debug_close() on cleanup if necessary.
1026
1027 2002-03-14  Martin Baulig  <martin@gnome.org>
1028
1029         * debug-private.h: New private header file.
1030
1031         * debug-stabs.c: Added the stabs type generation stuff which was
1032         previously in debug.c.
1033
1034         * debug-dwarf.c: Started to implement type support. We're currently
1035         only writing this most basic types to the dwarf file, but this will
1036         change soon.
1037
1038 2002-03-13  Martin Baulig  <martin@gnome.org>
1039
1040         * debug-stabs.c, debug-dwarf2.c: New files containing my new
1041         debugging code. They're now in CVS, but not yet used anywhere.
1042
1043 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
1044
1045         * emit-x86.c (mono_delegate_ctor): use C impl. instead of x86_*
1046         macros, included new delegate code from Daniel Stodden. 
1047         
1048         
1049 Mon Mar 11 14:47:21 CET 2002 Paolo Molaro <lupus@ximian.com>
1050
1051         * jit.c: verify that corlib and runtime are in sync.
1052
1053 Mon Mar 11 11:30:56 CET 2002 Paolo Molaro <lupus@ximian.com>
1054
1055         * emit-x86.c, jit.c: use the debug-helpers facilities to
1056         describe and match a method when debugging.
1057
1058 2002-03-10  Martin Baulig  <martin@gnome.org>
1059
1060         * emit-x86.c (arch_compile_method): When emitting stabs debugging
1061         output, put a nop instruction at the start of all functions so that
1062         the adresses won't change when using --debug.
1063
1064         * debug.c (mono_debug_add_method): `tree->cli_addr' is an offset into
1065         the bytecode area, stabs needs a line number in the .il file. Use the
1066         new info->moffsets to get the line number.
1067         (AssemblyDebugInfo): Added `total_lines' and `moffsets' fields.
1068         `moffsets' is an array of `total_lines' fields (total number of lines
1069         in the .il file); for each line in the .il field, this array contains
1070         the bytecode offset if it's an "IL_xxxx" line, -1 if it's the last line
1071         of a method and 0 otherwise.
1072         (debug_load_method_lines): Read the whole .il file and initialize the
1073         info->moffsets field.
1074
1075 2002-03-09  Martin Baulig  <martin@gnome.org>
1076
1077         * x86.brg (DIV_UN): Clear EDX before performing the division and remove
1078         the unnecessary CDQ instruction.
1079
1080 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
1081
1082         * jit.c (mono_analyze_stack): only load addresses of value types
1083         on the runtime stack.
1084
1085 2002-03-07  Duncan Mak  <duncan@ximian.com>
1086
1087         * Makefile.am: A small patch fixing errors in vpath-based builds
1088         (make clean failing to rerun monoburg due to BUILT_SOURCES usage),
1089         committed for Daniel Stodden <stodden@in.tum.de>. 
1090
1091 Thu Mar 7 17:22:52 CET 2002 Paolo Molaro <lupus@ximian.com>
1092
1093         * jit.c: Boehm-GC enable.
1094
1095 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
1096
1097         * x86.brg (SAVE_LFM): bug fix: patch the saved IP because we
1098         realloc that code sometimes!
1099
1100         * emit-x86.c (mono_compute_branches): support several types of
1101         jump infos
1102
1103 2002-03-06  Dietmar Maurer  <dietmar@ximian.com>
1104
1105         * x86.brg: impl. MUL_OVF_UN (reg, reg)
1106
1107         * jit.c (mono_find_final_block): find correct finally handler.
1108
1109         * emit-x86.c (arch_create_jit_trampoline): bug fix: preserve
1110         caller saved registers.  
1111
1112 2002-03-05  Dietmar Maurer  <dietmar@ximian.com>
1113
1114         * x86.brg: use x86_widen_reg for CONV opcodes
1115
1116 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
1117
1118         * jit.c (MAKE_SPILLED_BI_ALU): remove unnecessary assertions
1119
1120         * emit-x86.c (arch_handle_exception): big fix - dont use
1121         uninitialized next_bp
1122         (arch_compile_method): make the jit thread save
1123         (x86_magic_trampoline): moved lock/unlock to x86_magic_trampoline
1124         to avoid need of recursive mutexes
1125
1126         * x86.brg: use new mono_assert macros
1127
1128 2002-02-28  Dietmar Maurer  <dietmar@ximian.com>
1129
1130         * emit-x86.c (arch_create_jit_trampoline): save/restore LMF before
1131         calling into unmanaged code (arch_compile_method).
1132
1133         * x86.brg: impl. CONV_I4 (freg) with correct rounding
1134         (lreg): impl CALL_I8(INTF_ADDR)
1135         impl. CONV_R_UN (reg)
1136         bug fix im REM_UN
1137
1138 2002-02-27  Dietmar Maurer  <dietmar@ximian.com>
1139
1140         * emit-x86.c (arch_runtime_invoke): impl. runtime invoke for the jit.
1141
1142 2002-02-26  Dietmar Maurer  <dietmar@ximian.com>
1143
1144         * x86.brg: bug fix in CLT(lreg,lreg)
1145         (reg): bug fix in CONV_OVF_I4(lreg)
1146         (lreg): replaced x86_call_reg with x86_call_code
1147
1148         * emit-x86.c (mono_add_jump_info): impl.
1149         (mono_compute_branches): patch real jump address (instead of
1150         emitting code twice)
1151
1152 Tue Feb 26 11:56:03 CET 2002 Paolo Molaro <lupus@ximian.com>
1153
1154         * x86.brg: optimize cmp reg,0 -> test reg.
1155
1156 Sun Feb 24 13:58:34 CET 2002 Paolo Molaro <lupus@ximian.com>
1157
1158         * jit.h, jit.c, emit-x86.c: Added a few statistics counters
1159         and the --stats command line option to print them.
1160         Fixed memory leak in arch_compile_method () when a method's code is
1161         found in the cache. Fix magic trampoline to deal with static calls.
1162
1163 2002-02-21  Dietmar Maurer  <dietmar@ximian.com>
1164
1165         * x86.brg: impl. SHR_UN for lreg, added new test, bug fix for BNE_UN 
1166
1167 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
1168
1169         * emit-x86.c (arch_compile_method): add shared code to mono_root_domain
1170         (arch_create_jit_trampoline): cache trampoline code
1171
1172 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
1173
1174         * jit.c (mono_analyze_stack): optimize LDSFLD/STSFLD for domain
1175         specific code.
1176         (mono_analyze_stack): use MB_TERM_LDELEMA to perform bound check
1177
1178         * x86.brg: do not encode exception objects into the instruction
1179         stream, because they are domain dependend. Use
1180         arch_get_throw_exception_by_name() instead;
1181
1182 Mon Feb 18 15:51:40 CET 2002 Paolo Molaro <lupus@ximian.com>
1183
1184         * jit.c: intern command line arguments.
1185
1186 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
1187
1188         * jit.c (mono_analyze_stack): use the magic trampoline for all
1189         calls (since we cant store the address of compiled code in
1190         method->addr).
1191         (mono_analyze_stack): imp. LDSTR for shared code
1192
1193         * emit-x86.c (x86_magic_trampoline): handle x86_call_code().
1194         (arch_compile_method): add a cache for compiled methods to avoid
1195         recompilation. dont use method->addr to store domain dependent
1196         code address.
1197
1198 2002-02-15  Dietmar Maurer  <dietmar@ximian.com>
1199
1200         * x86.brg: impl. BLE,BGT for freg
1201
1202 Sat Feb 16 16:27:42 CET 2002 Paolo Molaro <lupus@ximian.com>
1203
1204         * emit-x86.c: handle unreachable code. Eliminate some unneeded
1205         malloc() calls.
1206         * jit.c: handle unreachable code. Move setting of mono_end_of_stack to
1207         main(). Add --compile classname and --ncompile num command line
1208         options to do performance evaluation of the jitter (and help
1209         debugging).
1210
1211 2002-02-15  Dietmar Maurer  <dietmar@ximian.com>
1212
1213         * emit-x86.c (arch_compile_method): bug fix in static delegate
1214         Invoke code.
1215
1216 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
1217
1218         * jit.c (mono_analyze_stack): do a LDIND after NEWOBJ for value types.
1219
1220 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
1221
1222         * jit.c (mono_analyze_stack): impl. CEE_SIZEOF
1223
1224 2002-02-13  Miguel de Icaza  <miguel@ximian.com>
1225
1226         * jit.c (arch_allocate_var): Only assert that the alignment is
1227         at least 32-bits aligned, not always 32-bits aligned (for I8 for example).
1228
1229 Mon Feb 11 11:20:57 CET 2002 Paolo Molaro <lupus@ximian.com>
1230
1231         * x86.brg: fix invalid cast check in unbox. Pack MBTree structure.
1232
1233 Sun Feb 10 12:54:05 CET 2002 Paolo Molaro <lupus@ximian.com>
1234
1235         * emit-x86.c: make x86_magic_trampoline() handle call instructions
1236         with an imm8 displacement. x86.brg not yet changed to take advantage
1237         of it.
1238
1239 Sun Feb 10 11:47:30 CET 2002 Paolo Molaro <lupus@ximian.com>
1240
1241         * jit.c: use opcode info from libmetadata to do flow analysis
1242         and simplify code.
1243
1244 2002-02-06  Dietmar Maurer  <dietmar@ximian.com>
1245
1246         * jit.c (MAKE_LDELEM, MAKE_STELEM): added bound checking 
1247
1248 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
1249
1250         * x86.brg: use element_class for type check
1251
1252 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
1253
1254         * jit.c (main): impl. __array_Address icall
1255
1256         * mempool.c (mono_mempool_alloc): handle large block allocation
1257
1258 2002-02-01  Dietmar Maurer  <dietmar@ximian.com>
1259
1260         * x86.brg: impl. SHL/SHR/CLT for 64 bit values
1261
1262 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
1263
1264         * x86.brg: impl. CEQ(lreg,lreg)
1265
1266         * jit.c (mono_analyze_stack): impl. LDVIRTFTN
1267         (mono_analyze_stack): handle MONO_TABLE_MEMBERREF in LDSFLD/STSFLD
1268
1269         * x86.brg: removed some dead code.
1270
1271 2002-01-18  Dietmar Maurer  <dietmar@ximian.com>
1272
1273         * jit.c (arch_allocate_var): fixed alignment bugs
1274
1275 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
1276
1277         * jit.c (mono_analyze_stack): use LDIND_REF/STIND_REF
1278
1279 2002-01-16  Dietmar Maurer  <dietmar@ximian.com>
1280
1281         * jit.c (main): install the trampoline before we start to create
1282         objects.
1283
1284         * x86.brg: impl. CLT_UN, CGT_UN
1285
1286         * emit-x86.c (leave_method): added check for null object
1287         (enter_method): consider byref arguments
1288
1289 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
1290
1291         * x86.brg: bug fix in CONV_OVF_I1_UN
1292         impl. ADD_OVF, MUL_OVF
1293         impl. ADD_OVF_UN, SUB_OVF, SUB_OVF_UN
1294         (SUB (lreg, lreg)): bug fix - use SBB instead of SUB
1295         (EMIT_COND_EXCEPTION): added signed flag
1296
1297 Fri Jan 11 20:06:22 CET 2002 Paolo Molaro <lupus@ximian.com>
1298
1299         * jit.c: implement stloc, ldloc, ldloca.
1300
1301 2002-01-11  Dietmar Maurer  <dietmar@ximian.com>
1302
1303         * jit.c (mono_analyze_stack): fixed calculation of last_instr
1304
1305         * x86.brg (LDLEN): emit null_reference exception
1306         (BLE_UN): bug fix. 
1307         (RET, RET_VOID, RET_OBJ, ...) fixed jump to epilog
1308
1309 2002-01-04  Dietmar Maurer  <dietmar@ximian.com>
1310
1311         * x86.brg: bug fix in CASTCLASS
1312
1313 2001-12-21  Dietmar Maurer  <dietmar@ximian.com>
1314
1315         * jit.c (mono_analyze_stack): spill MUL to avoid problem with
1316         register allocation.
1317
1318         * emit-x86.c (arch_compile_method): fixed static delegate bug
1319
1320 2001-12-16  Miguel de Icaza  <miguel@ximian.com>
1321
1322         * x86.brg, jit.c: Split up the nodes that we used to share on
1323         CONV_OVF.  They were sharing the nodes because they are the same
1324         on 32-bit machines, but on 64-bit machines you need different
1325         code for them.
1326
1327 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
1328
1329         * x86.brg: removed prerequisite that (tree->left->reg1 <
1330         tree->right->reg1) to make register allocation easier.
1331
1332 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
1333
1334         * emit-x86.c (arch_handle_exception): new code to handle
1335         exceptions inside unmanaged code.
1336
1337         * x86.brg: impl. SAVE_LMF, RESTORE_LMF, pass implizit valuetype
1338         address as first argument.
1339
1340 2001-12-15  Dietmar Maurer  <dietmar@ximian.com>
1341
1342         * x86.brg: pass exceptions on the stack
1343
1344         * jit.h (ISSTRUCT): new macro to check for real value types
1345         (return false for enum types). 
1346
1347 2001-12-11  Dietmar Maurer  <dietmar@ximian.com>
1348
1349         * x86.brg: use position indepentent code if possible. 
1350
1351         * x86.brg (EMIT_COND_EXCEPTION): new macro.
1352
1353         * emit-x86.c (mono_emit_cfg): impl. variable code buffer size
1354
1355 2001-12-10  Dietmar Maurer  <dietmar@ximian.com>
1356
1357         * jit.c (mono_analyze_flow): use g_malloc0 o allocate large bcinfo
1358         blocks.
1359         (mono_analyze_flow): use g_malloc0 o allocate large bblocks array.
1360
1361         * x86.brg (stmt): added opt. for STIND_R4/STIND_R8
1362
1363 2001-12-07  Dietmar Maurer  <dietmar@ximian.com>
1364
1365         * jit.c (mono_allocate_intvar): bug fix.
1366
1367         * emit-x86.c (get_unbox_trampoline): impl.
1368
1369         * jit.c (mono_analyze_stack): impl STOBJ, LEAVE
1370
1371 2001-12-06  Dietmar Maurer  <dietmar@ximian.com>
1372
1373         * x86.brg: raise exceptions.
1374
1375 2001-12-05  Dietmar Maurer  <dietmar@ximian.com>
1376
1377         * x86.brg: impl. CEQ for freg, NEWSTRUCT now allocates valuetypes on
1378         the stack. 
1379
1380 2001-12-06  Miguel de Icaza  <miguel@ximian.com>
1381
1382         * jit.c (mono_analyze_stack), x86.brg: Implement CONV.OVF.I1,
1383         CONV.OVF.I4, CONV.OVF.I1.UN, CONV.OVF.U1, CONV.OVF.U1.UN,
1384         CONV.OVF.I2.UN, CONV.OVF.I8.UN
1385
1386 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
1387
1388         * x86.brg: impl. UNBOX, NEWSTRUCT, removed VTYPE, bug fixes,
1389         removed the locaddr nonterminal, reimplemented value types
1390         
1391         * jit.c: reimplemented value type support, better support for
1392         enumeration types. 
1393
1394 2001-12-03  Miguel de Icaza  <miguel@ximian.com>
1395
1396         * x86.brg, jit.c: Implement conv.ovf.u4, conv.ovf.u2, conv.ovf.i2,
1397         conv.ovf.u8 
1398
1399 Mon Dec 3 17:16:36 CET 2001 Paolo Molaro <lupus@ximian.com>
1400
1401         * jit.c: call mono_init() after registering internal calls.
1402
1403 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
1404
1405         * emit-x86.c (tree_preallocate_regs): improved register allocation
1406
1407         * x86.brg: impl. ISINST, CASTCLASS
1408
1409 Fri Nov 30 12:02:24 CET 2001 Paolo Molaro <lupus@ximian.com>
1410
1411         * x86.brg: rearrange fields to reduce struct size.
1412         * jit.c: use signature->param_count, not signature->params_size.
1413         * debug.c: off-by-one error fix.
1414
1415 2001-11-29  Radek Doulik  <rodo@ximian.com>
1416
1417         * Makefile.am: build mono only for X86 architecture, compilation
1418         fails for ppc now because of accessing registers in sigcontext
1419         structure
1420
1421 2001-11-29  Dietmar Maurer  <dietmar@ximian.com>
1422
1423         * jit.c (mono_analyze_stack): bug fix in DUP
1424
1425 Thu Nov 29 12:32:01 CET 2001 Paolo Molaro <lupus@ximian.com>
1426
1427         * debug.c: fix type handling. Position function position at start of
1428         IL code. Output more fine-grained stepping information.
1429
1430 2001-11-28  Dietmar Maurer  <dietmar@ximian.com>
1431
1432         * x86.brg (LDIND_I1, LDIND_I2): use x86_widen_ instead of x86_mov_
1433
1434         * jit.c (mono_analyze_stack): record the cli_address for later use
1435         with gdb.
1436         (sigsegv_signal_handler): translate sigsegv into "Internal error"
1437         exception.
1438
1439 Tue Nov 27 16:32:41 CET 2001 Paolo Molaro <lupus@ximian.com>
1440
1441         * debug.c, debug.h: added support for generating stabs.
1442         Stabs can be compiled with as and the resulting object file can be
1443         loaded in a gdb session with add-symbol-file object.o.
1444         * jit.c, jit.h: add --stabs and --debug command line arguments. Keep track
1445         where locals and arguments are stored in the stack. Add support for
1446         passing command line arguments to CLR programs.
1447         * emit-x86.c: insert a breakpoint at method invocation if needed.
1448
1449 2001-11-27  Dietmar Maurer  <dietmar@ximian.com>
1450
1451         * jit.c: exception support
1452
1453         * emit-x86.c (arch_emit_epilogue): bug fix: restore the regs in
1454         the right order.
1455
1456 2001-11-26  Dick Porter  <dick@ximian.com>
1457
1458         * Makefile.am (mono_LDADD): Add io-layer library
1459
1460 2001-11-19  Dietmar Maurer  <dietmar@ximian.com>
1461
1462         * jit.c (mono_analyze_stack): impl. LDFTN
1463         (MAKE_SPILLED_BI_ALU): always spill DIV/REM results to memory to
1464         make register allocation easier on x86
1465
1466         * emit-x86.c (enter_method): more debugging output for Strings
1467         (arch_compile_method): added delegate support
1468         (arch_compile_method): align EBP to 8 byte boundary
1469
1470 Mon Nov 19 11:36:22 CET 2001 Paolo Molaro <lupus@ximian.com>
1471
1472         * jit.c: use mono_install_trampoline (), instead of exporting
1473         a function to a lower-level library.
1474
1475 2001-11-16  Dietmar Maurer  <dietmar@ximian.com>
1476
1477         * x86.brg (STRING_ARG): impl. a way to marshal strings. This
1478         will be extensible to handle all possible kinds of marshalling
1479         requirements. 
1480
1481         * jit.c (map_call_type): added MB_TERM_CALL_VOID
1482         (mono_analyze_stack): impl. LDELEMA, reimplemented CALL
1483         instructions to handle this arguments more effectively.
1484
1485 2001-11-15  Dietmar Maurer  <dietmar@ximian.com>
1486
1487         * Makefile.am (mono_SOURCES): renamed testjit to mono
1488
1489         * x86.brg: added debugging support 
1490
1491         * testjit.c: added support for value types, CFG improvements
1492
1493         * emit-x86.c (enter_method): handle value types
1494         (tree_allocate_regs): impl. a better way to handle chain rules
1495
1496 2001-11-10  Dietmar Maurer  <dietmar@ximian.com>
1497
1498         * x86.brg (INITOBJ): bug fix: initialize data before use,
1499         simplified the code.
1500
1501 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
1502
1503         * testjit.c (mono_analyze_stack): Remove compiler warning by
1504         testing against NULL.
1505
1506 2001-11-09  Dick Porter  <dick@ximian.com>
1507
1508         * Makefile.am (testjit_LDADD): Don't need THREAD_LIBS any more
1509
1510 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
1511
1512         * testjit.c (mono_analyze_stack): new BOX impl.
1513
1514         * x86.brg: implemented INITOBJ
1515
1516         * testjit.c (mono_analyze_stack): finished array support
1517         (mono_analyze_stack): reimplemented DUP instruction
1518
1519 2001-11-08  Dietmar Maurer  <dietmar@ximian.com>
1520
1521         * testjit.c (MAKE_STELEM, MAKE_LDELEM): we build a tree which
1522         represents the address of the element. This way we can emit highly
1523         optimized x86 instructions to access elements (using base+index+offset
1524         adressing mode)
1525
1526 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
1527
1528         * mempool.c: Include string.h to kill warning.
1529
1530         * testjit.c: Add typecast to kill warning.
1531
1532         * x86.brg: Include string.h to eliminate warning.
1533
1534         * emit-x86.c (tree_allocate_regs): Fix arguments to g_warning to
1535         kill warning.
1536
1537 2001-11-07  Dietmar Maurer  <dietmar@ximian.com>
1538
1539         * emit-x86.c (enter_method): print out all method arguments
1540         (x86_magic_trampoline): impl.
1541         (arch_create_simple_jit_trampoline): we use different trampolines
1542         for static methods (no need to write the address back into to
1543         vtable).
1544
1545 2001-11-06  Dietmar Maurer  <dietmar@ximian.com>
1546
1547         * emit-x86.c (arch_create_jit_trampoline): optimised trampoline to
1548         use less the 16 bytes.
1549
1550         * x86.brg: code cleanup
1551
1552 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
1553
1554         * testjit.c: bug fixes.
1555
1556         * emit-x86.c (leave_method): print result values
1557
1558 2001-11-03  Dietmar Maurer  <dietmar@ximian.com>
1559
1560         * emit-x86.c (enter_method): new debugging code
1561         (leave_method): new debbuging code, this functions are called
1562         when you use the new option --trace-calls
1563
1564 2001-11-02  Dietmar Maurer  <dietmar@ximian.com>
1565
1566         * testjit.c: impl. STELEM_XX, STELEM_XX
1567
1568         * x86.brg: impl. LDLEN, LDELEMA
1569         
1570
1571 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
1572
1573         * x86.brg: added some experimental code for CALL
1574         instructions - still not found the optimal way to do it.
1575
1576         * testjit.c (map_stind_type): add support for value types with
1577         a size of 1, 2 or 4 bytes, implemented CEE_UNBOX, CEE_LDOBJ,
1578         CEE_LDSTR, CEE_LDFLD, CEE_LDFLDA, CEE_STFLD, CEE_NEWOBJ, CEE_CEQ
1579         (ctree_create_newobj): impl.
1580         
1581
1582         * emit-x86.c (tree_allocate_regs): removed allocation code for
1583         addr nonterminal.
1584         (get_address): use a simple, but bug free search instead of the
1585         buggy binary search.
1586
1587 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
1588
1589         * testjit.c: support virtual functions
1590
1591         * x86.brg: support different addressing modes for calls
1592
1593 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
1594
1595         * testjit.c: impl. STFLD
1596
1597 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
1598
1599         * x86.brg: impl. CEQ
1600
1601 2001-10-04  Dick Porter  <dick@ximian.com>
1602
1603         * testjit.c:
1604         * emit-x86.c: include mono-endian.h not endian.h
1605
1606 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
1607
1608         * testjit.c (ctree_create_dup): really duplicate the tree.
1609         attach the arguments to the CALL node. Added a new macro to
1610         make argument order configurable (ARCH_ARGS_RIGHT_TO_LEFT).
1611
1612 2001-10-01  Dietmar Maurer  <dietmar@ximian.com>
1613
1614         * interp.brg: the burm based interpreter: added the file as example.
1615
1616 2001-09-27  Dietmar Maurer  <dietmar@ximian.com>
1617
1618         * x86.brg: cleanup
1619
1620         * testjit.c: impl. LDIND/STIND/LDLOCA, use g_malloc to alloc static
1621         data.
1622         (map_stind_type): support enum types
1623         (map_ldind_type): support enum types
1624
1625         * emit-x86.c (tree_allocate_regs): added code to support
1626         register allocation for addressing modes trees.
1627         (tree_emit): bug fix: we have to emit all mono_burg_functins. The
1628         previous impl. did not work for chain rules.
1629         (compute_branches): support for SWITCH statements
1630
1631         * x86.brg: added rules to model x86 addressing modes
1632
1633 2001-09-26  Dietmar Maurer  <dietmar@ximian.com>
1634
1635         * emit-x86.c (compute_branches): implemented SWITCH
1636
1637         * testjit.c (mono_create_forest): implemented LDIND/STIND opcodes
1638         (map_ldind_type): add enumeration types.
1639         (map_stind_type): add enumeration types.
1640
1641         * emit-x86.c (arch_compile_method): more documentation.
1642
1643         * testjit.c: moved the architecture specific things to emit-x86.c
1644         and x86.brg. Added more documentation. code cleanup.
1645
1646 2001-09-25  Dietmar Maurer  <dietmar@ximian.com>
1647
1648         * x86.brg: we now have different types of addresses: ADDR_L for local
1649         values, ADDR_A for arguments and ADDR_G for global addresses. We
1650         also use LDIND_XX token to load values from a specific address
1651         instead of LDLOC/STLOC. 
1652
1653         * testjit.c: use the new adressing scheme everywhere:
1654         LDIND _XX (ADDR_X), and STIND_XX (ADDR_X, tree)  
1655
1656 2001-09-24  Dietmar Maurer  <dietmar@ximian.com>
1657
1658         * testjit.c (main): fix bug in parameter parsing
1659
1660         * x86.brg: impl. more opcodes
1661
1662 2001-09-23  Dick Porter  <dick@ximian.com>
1663
1664         * Makefile.am (testjit_LDADD): rename PTHREAD_LIBS to THREAD_LIBS
1665
1666 2001-09-23  Dietmar Maurer  <dietmar@ximian.com>
1667
1668         * testjit.c: use the memory pool to avoid memory leaks
1669
1670 2001-09-22  Dietmar Maurer  <dietmar@ximian.com>
1671
1672         * x86.brg: increment the stack pointer after function calls
1673
1674 2001-09-21  Dick Porter  <dick@ximian.com>
1675
1676         * Makefile.am (testjit_LDADD): Added PTHREAD_LIBS to the link line
1677
1678 2001-09-21  Dietmar Maurer  <dietmar@ximian.com>
1679
1680         * x86.brg: implemented long MUL/DIV
1681         (MB_OPT_LEVEL): define optimisation level macro
1682
1683         * testjit.c (tree_allocate_regs): added a way to prevent EDX usage
1684         for operations like idiv. it is also possible to assign specific registers.
1685
1686 2001-09-20  Dietmar Maurer  <dietmar@ximian.com>
1687
1688         * x86.brg: added basic support for long
1689
1690         * testjit.c (mono_compile_method): implemented POP
1691
1692 2001-09-19  Miguel de Icaza  <miguel@ximian.com>
1693
1694         * testjit.c (usage): Added a couple of more usage options.
1695
1696 2001-09-19  Dietmar Maurer  <dietmar@ximian.com>
1697
1698         * x86.brg: added more floating point grammar 
1699
1700         * testjit.c (mono_compile_method): make local offsets negative
1701
1702         * x86.brg: added some floating point trees
1703
1704         * testjit.c (mono_compile_method): arguments on the runtime 
1705         stack are at least 4 bytes
1706
1707         * x86.brg: partly implemented 8,16 bit integers
1708
1709         * testjit.c (get_address): mark basic blocks
1710
1711 2001-09-18  Dietmar Maurer  <dietmar@ximian.com>
1712
1713         * x86.brg: added some rules to optimize code
1714
1715         * testjit.c (get_address): use a binary search to get the address
1716         (main): added an option to debug the jit (-d)
1717
1718 Tue Sep 18 13:19:16 CEST 2001 Paolo Molaro <lupus@ximian.com>
1719
1720         * testjit.c: better/faster align code. Handle ldloc.s and stloc.s.
1721
1722 2001-09-17  Miguel de Icaza  <miguel@ximian.com>
1723
1724         * testjit.c (mono_compile_method): Provide better error reporting.
1725
1726 2001-09-17  Dietmar Maurer  <dietmar@ximian.com>
1727
1728         * testjit.c (tree_get_address): impl. to fix address bug
1729         (tree_get_address): make sure that we can only jump to the first
1730         instruction of a tree.
1731
1732         * x86.brg: emit real code for calls
1733
1734         * testjit.c (create_jit_trampoline): creates a function to trigger jit
1735         compilation.
1736         (mono_compile_method): reversed argument order
1737
1738 2001-09-15  Dietmar Maurer  <dietmar@ximian.com>
1739
1740         * x86.brg (stmt): don't emit unnecessary register moves
1741
1742         * testjit.c (tree_allocate_regs): free registers earlier
1743
1744 2001-09-14  Dietmar Maurer  <dietmar@ximian.com>
1745
1746         * x86.brg: branch addresses are now resolved
1747
1748         * testjit.c (compute_branches): compute address of branches
1749
1750         * x86.brg: emit real x86 instructions
1751
1752         * testjit.c: call objdump to disassemble the output
1753
1754 2001-09-13  Dietmar Maurer  <dietmar@ximian.com>
1755
1756         * x86.brg: use the right offsets to access local variables
1757         and arguments.
1758
1759         * emit-x86.c: only save/restore callee saved registers if they are
1760         really modified.
1761
1762         * testjit.c (tree_allocate_regs): use the new MonoRegSet to
1763         allocate registers.
1764         (mono_compile_method): changed the tree for mothod calls
1765
1766         * regset.h: impl.
1767         
1768         * regset.c: impl.
1769         
1770
1771 2001-09-10  Miguel de Icaza  <miguel@ximian.com>
1772
1773         * x86.brg: Use Unix assembly syntax.
1774
1775         * emit-x86.c: support code, should be moved
1776
1777         * testjit.c: Use GPtrArrays instead of GLists, as those are very
1778         inefficient at appends.
1779
1780         * Renamed `create_new_leave' to `create_new_leaf'
1781
1782         
1783