summaryrefslogtreecommitdiff
path: root/INSTALL/README-MELT-PLUGIN
blob: 903da00626d196683edc309ee790244a8bae98a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
Short installation instructions for MELT as a plugin to an installed
gcc-4.7 enabled for plugins.

See also http://gcc.gnu.org/wiki/MELT and http://gcc-melt.org/

MELT is a plugin and domain specific language for extending GCC (the
Gnu Compiler Collection), free software GPLv3+ licensed, FSF
copyrighted. MELT is a lispy, high-level, language providing pattern
matching and enabling functional/applicative/reflective programming
styles, to ease development of GCC extensions.  MELT is translated to
C code (and the MELT translator is implemented in MELT).

If installing MELT as plugin to some existing gcc-4.7 installation
tree, with the support of plugins enabled.


################ quick steps for Debian/Unstable or Ubuntu or derived distributions ####

## Run as root (e.g. with sudo):
  apt-get install gcc-4.7 g++-4.7 make texinfo texi2html autogen gawk
  apt-get build-dep gcc-4.7
  apt-get install libppl-dev libppl-c-dev gcc-4.7-plugin-dev 

## then retrieve the MELT plugin release, and cd into it, then
  make all
  make install DESTDIR=/tmp/meltinstall

## You might explicit the compiler you want to extend and to use:
  make all CC=/usr/bin/gcc-4.7 CXX=/usr/bin/g++-4.7
  make install CC=/usr/bin/gcc-4.7 CXX=/usr/bin/g++-4.7 DESTDIR=/tmp/meltinstall

## The first "make all" needs 15 minutes, less than 1Gb disk, 4Gb RAM, and
## *cannot be* a parallel "make -j all"

## finally, as root copy the destination to install MELT
  cp -v -p -R /tmp/meltinstall/. /.

## Since MELT may generate and compile C code on the fly, you'll need its build
## dependencies even to run it..

## You need to rebuild & reinstall MELT even for minor GCC release
##   upgrades (ie. from GCC 4.6.2 to 4.6.3).


#########################################################################
################################################################ DETAILS

################ step 1

First, ensure that GCC 4.6 or 4.7 is correctly installed and has been built
with plugins enabled, for example (on a Debian Unstable, package gcc-4.6):

 % gcc-4.6 -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc-4.6
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.3-1' 
 --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs 
 --enable-languages=c,c++,fortran,objc,obj-c++,go --prefix=/usr 
 --program-suffix=-4.6 --enable-shared --enable-linker-build-id 
 --with-system-zlib --libexecdir=/usr/lib --without-included-gettext 
 --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 
 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu 
 --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin 
 --enable-objc-gc --with-arch-32=i586 --with-tune=generic 
 --enable-checking=release --build=x86_64-linux-gnu 
 --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.3 (Debian 4.6.3-1) 

Be sure that you have all the development packages for all libraries
used by GCC (e.g. run 'apt-get build-dep gcc' on Debian). In
particular, you'll need the headers of CLOOG, PPL, MPC, MPFR, GMP
libraries.

Ensure that your system have recent autogen, GNU make, gawk (GNU awk), texinfo,
texi2html utilities

################ step 2

Then, be sure that the GCC plugin development support has been
installed. (On Debian, you'll need the gcc-4.6-plugin-dev package).

So you should have something like
% gcc-4.6 -print-file-name=plugin 
/usr/lib/gcc/x86_64-linux-gnu/4.6.3/plugin

Be sure that this plugin subdirectory is populated correctly since it
contains an include file.

% ls -l $(gcc-4.6 -print-file-name=plugin)
total 4
drwxr-xr-x 8 root root 20480 Mar  2 13:53 include

Be sure that this include subdirectory contains meaningful files for
GCC, like those for GIMPLE
% ls -l $(gcc-4.6 -print-file-name=plugin)/include/gimple.* 
-rw-r--r-- 1 root root  13735 Mar  1 20:31 /usr/lib/gcc/x86_64-linux-gnu/4.6/plugin/include/gimple.def
-rw-r--r-- 1 root root 123008 Mar  1 20:31 /usr/lib/gcc/x86_64-linux-gnu/4.6/plugin/include/gimple.h


Be sure that the gengtype executable and its gtype.state textual data
file is available somewhere. On Debian/Sid the package
gcc-4.6-plugin-dev provides: 
-rwxr-xr-x 1 root root 163840 Mar  1 20:38 /usr/lib/gcc/x86_64-linux-gnu/4.6/gengtype
-rw-r--r-- 1 root root 614004 Mar  1 20:38 /usr/lib/gcc/x86_64-linux-gnu/4.6/gtype.state


and you get these files with 
  $(gcc-4.6 -print-file-name=gengtype) 
and 
  $(gcc-4.6 -print-file-name=gtype.state) 
respectively

Look with an editor, or just with the head command, that this gtype.state
file is indeed the one related to your gcc-4.6:
% head /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.6/gtype.state
;;;;@@@@ GCC gengtype state
;;; DON'T EDIT THIS FILE, since generated by GCC's gengtype
;;; The format of this file is tied to a particular version of GCC.
;;; Don't parse this file wihout knowing GCC gengtype internals.
;;; This file should be parsed by the same gengtype which wrote it.
;;; file gtype.state generated on Thu Mar  1 16:22:41 2012


(!version  "4.6.3")



################ step 3

Your plugin MELT directory should contain a Makefile which is a
symlink to a MELT-Plugin-Makefile file. Please look into that file.
(Most of the work is done in melt-build.mk, included from it).

Use
    make all
to build the MELT plugin which takes some time (15 minutes), because MELT is
retranslating itself. It cannot be a parallel make -j

Use
   make install DESTDIR=/tmp/meltinstall
to install the MELT plugin. The usual DESTDIR behave as expected.
As root, copy it appropriately:

   cp -v -R -p /tmp/meltinstall/. /.

#### uninstallation

Since all MELT related files are installed under 
$(gcc-4.6 -print-file-name=plugin) you can just do as root
   rm -v -r -f $(gcc-4.6 -print-file-name=plugin)/*melt*

to uninstall MELT


########## For packagers
Notice that the MELT plugin should be entirely rebuilt
even for small changes of the compiler (e.g. when upgrading gcc from
4.6.2 to 4.6.3).



################

To prepare a source tree of the MELT plugin from the GCC MELT branch,
run contrib/gcc_update then read and run
contrib/make-melt-source-tar.sh from the GCC MELT branch. For
instance, I am running it with something similar to

   /usr/src/Lang/gcc-melt-branch/contrib/make-melt-source-tar.sh \
       /usr/src/Lang/gcc-melt-branch \
       /tmp/gcc-melt-plugin 

If all goes well, you get a /tmp/gcc-melt-plugin.tgz gnuzipped tar
archive for the MELT plugin. This is only needed to people making a
new MELT plugin source archive.


################ 

Comments about the MELT plugin (including its installation script) are
welcome by email to <basile@starynkevitch.net> [please mention MELT in
the subject line] and to <gcc-melt@googlegroups.com>





################################################################
NEWS for 0.9.7 MELT plugin for GCC 4.6 & 4.7 & future 4.8
[[october, XXth, 2012]]

   Language improvement
   ====================

 When creating an instance with definstance or instance, the
 translator checks that fields are filled with values. Previous
 versions of MELT could crash in that case.

 (CHEADER ...) constructs are working as documented.

 The Parma Polyhedra Library is removed from MELT.

 String values know their length, so safe access to some byte inside
 is possible.

   Added a lot of cmatchers (and implicit primitives) like
	tree_boolean_false_node, tree_boolean_true_node,
	tree_boolean_type_node, tree_char_type_node,
	tree_const_ptr_type_node, tree_double_type_node,
	tree_float_type_node, tree_int128_integer_type_node,
	tree_int128_unsigned_type_node, tree_integer_minus_one_node,
	tree_integer_one_node, tree_integer_type_node,
	tree_integer_zero_node, tree_long_double_type_node,
	tree_long_integer_type_node, tree_long_long_integer_type_node,
	tree_long_long_unsigned_type_node,
	tree_long_unsigned_type_node, tree_null_pointer_node,
	tree_ptr_type_node, tree_short_integer_type_node,
	tree_short_unsigned_type_node, tree_signed_char_type_node,
	tree_size_type_node, tree_unsigned_char_type_node,
	tree_unsigned_type_node, tree_void_type_node
   to access the very built-in trees known to GCC.
   Added more tree & gimple related matchers and primitives.

 Less spurious warnings when building MELT.


   Runtime improvements
   ====================

  Add a runtime expression evaluation function
  TRANSLATE_RUN_MELT_EXPRESSIONS with a mode eval for initial
  evaluation of a sequence of expressions, and a mode repl for
  read-eval-print-loop.

  Advanced users could register their own finalized client data using
  the melt_payload_register_descriptor C function.

  The building procedure has been revamped. Advanced users could
  define their GCCMELT_BUILD_NOTIFICATION environment variable to
  e.g. a script meltbuild-notification like

      #! /bin/bash
      # first arg title, second arg message
      if [ "$DISPLAY" = ":0.0" -a -n "$DESKTOP_SESSION" -a $(which notify-send) ]; then
         notify-send -t 3500 -i info "MELT BUILD: $1" "$2"
      else
         logger -t meltbuild -p user.info "$1=" "$2"
      fi

  and they will have a nice bubble notification under most Linux
  desktops of the major steps of the build. The building procedure is
  now quicker than before.

  Advanved MELT users can set their MELTGCC_NO_CHECK_RUNTIME to
  disable checking of the MELT runtime. This is notably needed when
  the MELT plugin is compiled for a cross compiler.

  Advanced MELT users willing to debug with gdb could set the
  melt_alptr_1 and melt_objhash_1 in their gdb debugger to track
  allocation or changes of MELT values or objects.

  The -fmelt-debugging=all option works as expected in the MELT branch
  and so does -fplugin-arg-melt-debugging=all in the MELT plugin.


Numerous bug fixes. The probe has still naughty behavior on large C
source. Consider using Alexandre Lissy's replacement (Python/Qt
based) of the probe.





 ################################################################
 NEWS for 0.9.6 MELT plugin for GCC 4.6 & 4.7 [[july, 31st 2012]]

   Language improvements
   =====================

   Syntax: (USE-PACKAGE-FROM-PKG-CONFIG <packagename>)

   On systems, such as most Linux distributions, with the pkg-config
   utility http://en.wikipedia.org/wiki/Pkg-config
   http://pkg-config.freedesktop.org/ the given packagename is used
   when compiline the generated C code and when linking the generated
   shared module.

   Emited C code by MELT is more conformant to C++ and C coding standards.

   More primitives, macros, ... notably WHEN & UNLESS, like in Common Lisp...

   The CLASS_CONTAINER has been renamed as CLASS_REFERENCE. Likewise
   SET_CONTENT is renamed as SET_REFERENCE...


   Runtime improvements
   ====================

   When a function is called in an occurrence expecting secondary
   results and does not return secondary results, a warning is
   emitted.

   MELT may emit symlinks to "unique" C files in the workdir, helpful
   when regenerating an already generated file...

   "Interrupts" have been inproperly named, speak of "signals" (in the
   Posix/Unix sense, not the Gtk/Qt one!).

   The build of the MELT runtime and of the MELT modules is done by an
   autogen-erated shell script melt-build-script.sh generated from
   melt-build-script.tpl & melt-build-script.def. It should be more
   robust, and avoid doing useless things, so is faster when you
   rebuild again MELT.

   Add support for timers & child processes...

   Debugging run works well with plugin using
   -fplugin-arg-melt-debugging=all (or =mode).

   Library improvment
   ==================

   The probe mode is able to to start and communicate an external
   graphical probe.

   A simple probe, coded in C++ for GTKmm3.4, is available as a self
   contained program simplemelt-gtkmm-probe.cc; its compilation
   command is given at the very end of that source file, e.g.:

        g++ -std=gnu++0x -Wall -O -g \
          $(pkg-config --cflags --libs gtksourceviewmm-3.0  gtkmm-3.0  gtk+-3.0) \
        -o $HOME/bin/simplemelt-gtkmm-probe simplemelt-gtkmm-probe.cc

   The probe code in simplemelt-gtkmm-probe.cc is still buggy. 
   Sometimes, the probe windows freeze and you have to kill the process.

   You could have the following shell script, named melt-probe
                     
     #! /bin/bash -x
     # the -T argument to the probe display the trace window 
     # showing the exchanges between probe and MELT
     exec simplemelt-gtkmm-probe -T $*

   The probe mode is expecting a shell script or program named
   melt-probe somewhere in your path.

   You can now compile some C or C++ ... file with GCC enhanced by MELT, e.g.
     gcc -fplugin=melt -fplugin-arg-melt-mode=probe -c some-file.cc

   A graphical window appears, to display your source code
   some-file.cc (and others, e.g. included files). Click on the
   buttons inside it to show the corresponding GCC internals at the
   corresponding source location.

   Ability to walk on gimple sequences using GCC infrastructure thru
   walk_gimple_seq & walk_gimple_seq_unique_tree primitives.

   Much more interfaces to Gimple & Trees...

   The PPL (Parma Polyhedra Library) MELT binding is obsolete and will
be soon removed (see http://bugseng.com/products/ppl/ for more about
PPL, which is used in GCC-4.6 & GCC-4.7 for Graphite & Cloog, but won't
be used in GCC 4.8). Hence, avoid e.g. having values of
DISCR_PPL_CONSTRAINT_SYSTEM or using primitives or stuff of c-types
like :ppl_coefficient etc...

################################################################ NEWS
for 0.9.5 MELT plugin for GCC 4.6 & 4.7 [[April 12th 2012]]

   Language improvements
   =====================

   Alternative infix syntax is abandoned (it was never implemented)

   Accept $(sub sepxr) in macro-string and $[seq sepxr]

   Runtime improvements
   ====================

   Handle SIGIO Unix signals with asynchronous input channels
   (experimental feature)

   Can be compiled by C++ (since GCC 4.7 often is)

   All the values are translated to melt_ptr_t variables, not void*
   ones.

   Library improvment
   ==================

   Much more matchers, and much more generated documentation, to interface to
   GCC internal stuff in xtramelt-ana-base.melt
   

#######################################################################
NEWS for 0.9.4.b MELT plugin for GCC 4.6 (and 4.7 when available)
released on March 04th, 2012

   Language improvements
   =====================

Add CHEADER macro to insert header c-code. For example

   (cheader #{#include <readline/readline.h>}#)
or 
   (cheader #{inline int succ(int x) { return x+1;}}#)

[you still need dirty tricks to link an external library into a MELT
module; as a temporary workaround, consider editing melt-module.mk for
them, perhaps defining GCCMELT_MODULE_EXTRALIBES there, or link
manually the library into melt.so meta-plugin]

   Runtime 
   =======

Hash maps have an auxiliary data value, which can be accessed and set
at will. 

   Translator
   ==========

All C-generating devices (primitives, c-iterators, ...) emit their
code in a syntax checking C function, which is never called, but is
emitted to ensure the emittable C code is syntactically correct. This
catch typos in (defprimitive ...) etc... even for e.g. yet unused
primitives.

   Bugs 
   ====

Many bugs have been corrected.

[Notably, the 0.9.4 release of march 02nd 2012, -not this 0.9.4.b-
didn't generate documentation correctly]


#######################################################################
NEWS for 0.9.3 MELT plugin for gcc-4.6 (and future gcc-4.7)
January 27th, 2012

New features:

    Language improvements
    =====================

Ability to define a named value with the (DEFINE <name> <expr>) construct

   More support notably for Gimple & Tree
   ======================================
Added more cmatchers etc.

   Runtime improvement
   ===================

Generation of timestamping C file foo+melttime.h included from
generated descriptor file foo+meltdesc.c from foo.melt 

#######################################################################
NEWS for 0.9.2.b MELT plugin for gcc-4.6 (and future gcc-4.7)

December 08th, 2011: Release of MELT plugin 0.9.2 for gcc-4.6 (& future gcc-4.7)
	dedicated to the memory of John McCarthy
        http://en.wikipedia.org/wiki/John_McCarthy_(computer_scientist)

Several bug fixes.

New features:

    cloning of values
    =================

The CLONE_WITH_DISCRIMINANT primitive -whose implementation is mostly
generated- enables creating new values, nearly clones of old
ones. Usage is

    (clone_with_discriminant <old-value> <new-discriminant>)

If the new discriminant is compatible with the old value's
discriminant, a new value is allocated. If it is not compatible nor
not a discriminant, the old value is returned. In particular, it is
possible to use 
   (clone_with_discriminant (lambda ....) discr_debug_closure) 
to make a debugging closure.

   debugging closures 
   ==================

The DEBUG macro (and the underlying MELT_DEBUG_FUN which you should
not use directly) handles closure with the DISCR_DEBUG_CLOSURE
discriminant specially (somehow like C++ manipulators for
ostream-s). If an argument is a debugging closure of exactly the
DISCR_DEBUG_CLOSURE discriminant, the next argument is displayed using
that debugging closure.

   Walking SSA use-def chains
   ==========================

The primitives WALK_USE_DEF_CHAIN_BREADTH_FIRST &
WALK_USE_DEF_CHAIN_DEPTH_FIRST enables to walk thru the use-def chains
in SSA passes.

   More support notably for Gimple & Tree
   ======================================

Several functions, cmatchers, primitives have been defined, notably
GIMPLE_ASSIGN_TO, WALK_USE_DEF_CHAIN_BREADTH_FIRST &
WALK_USE_DEF_CHAIN_DEPTH_FIRST, EACHGIMPLEPHI_IN_BASICBLOCK


  New MELT hooks for PLUGIN_FINISH_TYPE & PLUGIN_FINISH_DECL
  ==========================================================

MELT functions can be registered using
REGISTER_FINISH_TYPE_HOOK_FIRST, REGISTER_FINISH_TYPE_HOOK_LAST,
REGISTER_FINISH_DECL_HOOK_FIRST, REGISTER_FINISH_DECL_HOOK_LAST. The
argument is a boxed tree value. The PLUGIN_FINISH_DECL don't exist in
GCC 4.6 (only in GCC 4.7 and later).

  New MELT hooks for other events
  ===============================
 
MELT functions can be register for PLUGIN_ALL_PASSES_START,
     PLUGIN_ALL_PASSES_END, PLUGIN_ALL_IPA_PASSES_START,
     PLUGIN_ALL_IPA_PASSES_END, PLUGIN_EARLY_GIMPLE_PASSES_START,
     PLUGIN_EARLY_GIMPLE_PASSES_END event using
 REGISTER_ALL_IPA_PASSES_END_HOOK_FIRST
 REGISTER_ALL_IPA_PASSES_END_HOOK_LAST
 REGISTER_ALL_IPA_PASSES_START_HOOK_FIRST
 REGISTER_ALL_IPA_PASSES_START_HOOK_LAST
 REGISTER_ALL_PASSES_END_HOOK_FIRST
 REGISTER_ALL_PASSES_END_HOOK_LAST
 REGISTER_ALL_PASSES_START_HOOK_FIRST
 REGISTER_ALL_PASSES_START_HOOK_LAST
 REGISTER_EARLY_GIMPLE_PASSES_END_HOOK_FIRST
 REGISTER_EARLY_GIMPLE_PASSES_END_HOOK_LAST
 REGISTER_EARLY_GIMPLE_PASSES_START_HOOK_FIRST
 REGISTER_EARLY_GIMPLE_PASSES_START_HOOK_LAST


  More runtime code generated
  ===========================
More runtime code is generated internally.

  Additional translating MELT modes
  =================================

The translatetomodule mode produces all three flavors (.quicklybuilt.so, .debugnoline.so, .optimized.so) of modules

The translateoptimized mode produces .optimized.so flavor of modules

#######################################################################
NEWS for 0.9.1 MELT plugin for gcc-4.6

October 24, 2011: Release of MELT plugin 0.9.1 for gcc-4.6
	dedicated to the memory of Dennis M. Ritchie
	http://en.wikipedia.org/wiki/Dennis_Ritchie

New features:

    variadic MELT functions. 
    =======================
A formal arguments list (i.e. formals for LAMBDA or DEFUN) ending with
:REST is for variadic functions with a variable number and type of
arguments (so :REST in MELT is similar to the ellipsis ... notation in
C prototypes).  At least one first formal argument should be provided
and should be a value.

The (VARIADIC ....) macro is used to fetch actual variadic
arguments. A variadic cursor is internally maintained to parse the
variadic actual arguments. The VARIADIC macro has a sequence of
variadic cases. Each variadic case starts with an ordinary
[non-variadic] formal arguments list, and has a body which is
evaluated for side effects if the current arguments at the cursor
position fits into the formal. The last variadic case can also starts
with an :ELSE.  See also
http://groups.google.com/group/gcc-melt/browse_thread/thread/c124ea6af940c08e

    variadic (DEBUG ....) macro.
    ============================

Debugging messages should go thru the variadic (DEBUG ...) macro which
accepts an arbitrary kind and number of arguments. The DEBUG_MSG macro
is obsolete.

   variadic ADD2OUT function
   =========================

The ADD2OUT variadic function add to an output (either a file value;
or a string buffer values) arbitrary things.

#######################################################################
NEWS for 0.9 MELT plugin for gcc-4.6

September 27th, 2011: Release of MELT plugin 0.9 for gcc-4.6

New features:

    Documentation is generated

    The PLUGIN_PRE_GENERICIZE event is interfaced.

    The build machinery and the binary module loading has been
    significantly updated.  Modules shared objects are like
    warmelt-macro.3461497d8ef7239dc1f2f132623e6dd5.quicklybuilt.so and
    they contain the md5sum of the catenation of all C files. They
    also come in various flavor: quicklybuilt (the generated C is
    compiled with -O0 -DMELT_HAVE_DEBUG), optimized (the generated C
    is compiled with -01 and without -DMELT_HAVE_DEBUG), debugnoline
    (the generated C is compiled with -g and -DMELT_HAVE_DEBUG but no
    #line directives).

    Conceptually, a module is loaded by loading its +meltdesc.c
    file. That file (e.g. warmelt-macro+meltdesc.c corresponding to
    warmelt-macro.melt) should never be moved or even edited.  It is
    parsed at module load time, and contains the various md5sum of
    real generated C files.

    New option -fplugin-arg-melt-workdir= for the work directory,
    where every .c or .so files are generated.

    The DISCR_BOX discriminant has been removed. Use containers instead.

    Containers, that is instances of class_container having one single field 
    :container_value, are supported by syntactic macros and sugar & function.
       (container V)   
          =equivalent=   (instance class_container :container_value V)
       (content C)
          =equivalent=   (get_field :container_value C)
       (set_content C V)
          =equivalent=   (put_fields C :container_value V)
    You can write exclaim instead of content, and there is a new syntactic 
    sugar
       !X

     is the same as (content X) - the exclamation mark should be
     followed by spaces, letters, or left parenthesis to be parsed as
     exclaim -that is as the content macro above.

    In patterns, ?(container ?v) means 
    ?(instance class_container :container_value ?v)

    Fields can be accessed by their name, so
      (:F C)
   is the same as (get_field :F C)
   Hence (:container_value foo) is the same as !foo or 
   (get_field :container_value foo)

   Experimental syntactic sugar: inside an s-expr, a macro string
   written ##{...}# is expanded as several components, not a single
   list.

   Experimental: ability to (define ...) values like in Scheme.

   Ability to create gimple-s and to modify gimple_seq.

   Slow boxed arithmetic operations are available (e.g. +iv gets two
   boxed integer and gives the boxed integer of their sum).

Many bug fixes.

The build system has been revamped. The generated .c files should be
available when running MELT.


Thanks to Pierre Vittet, Alexandre Lissy, Romain Geissler for
feedback, patches, suggestions.

#######################################################################
NEWS for 0.8 MELT plugin for gcc-4.6

July 11th, 2011: Release of MELT plugin 0.8 for GCC 4.6
as melt-0.8-plugin-for-gcc-4.6 on http://gcc-melt.org/


New features:
 * support for pragmas for MELT

 * the MELT garbage collector is called less often, using the
   PLUGIN_GGC_START hook.

 * several new c-iterators and c-matchers.

 * added static analyzing pass gccframe, useful for melt-runtime.c

 * reject nested defun-s, you should use letrec or let...

 * the MELT plugin is built with its MELT-Plugin-Makefile

 * debug_msg, assert_msg ... should work, thanks to MELT_HAVE_DEBUG
   preprocessor flag, even when melt.so is a plugin for a GCC without
   checks enabled.

 * melt-runtime.h has a melt_gcc_version integer variable and
   melt-runtime.c should be given MELT_GCC_VERSION preprocessor
   constant.

 * runfile mode compiles quickly (with debug_msg support). Add new mode
   translatequickly to compile quickly (with debug_msg & assert_msg
   support).

 * the MELT building procedure builds various variants of MELT modules,

   The 'optimized' variant is built with -O2 but don't support
   (debug_msg ...)  or (assert_msg ...). The 'quicklybuilt' variant is
   built with -O0 and supports debug_msg & assert_msg.  The
   'debugnoline' variant is mostly useful with gdb, and also supports
   debug_msg & assert_msg. These variants should be interoperable, you
   could have a warmelt* module with 'optimized' variant and an
   xtramelt* module in 'quicklybuilt' bariant.

Many bugfixes
  (but some bugs remain)

Thanks to Pierre Vittet for code contributions (notably thru Google
Summer of Code), Alexandre Lissy and Allan McRae for bug reports.

#######################################################################
NEWS for 0.7 MELT plugin for gcc-4.6

April 29th, 2011: first release, melt-0.7-plugin-for-gcc-4.6

################################################################
(MELT development is partly funded thru OpenGPU [FUI call] & GlobalGCC
[ITEA call] projects by French DGCIS).


################################################################