Using, Maintaining and Enhancing COBOL for the GNU Compiler Collection (GCC)


(1)

Within the scope of the course of lectures "Programming languages and Compiler Development" at the Technischen Universit@"at Darmstadt, a compiler for a small programming language is developed. Hitherto the output of the compiler was the creation of assembler code for the Motorola 68000 microprocessor family (HP Dialect). Later also java byte codes were used as the output target language. The quality of this code was often modest because optimisation was only possible with great effort on the part of the programmer. An alternative starting point for the formation of the output of the exercise is the use of a pre-existing code generator. With the help of unified documentation, such as is placed at your disposal here, it should be easy enough to use the GCC code generator.

(2)

This chapter was originally written in German by Joachim Nadler as a Programming Languages and Compilers, Information Technologya project at the Technische Universit@"at Darmstadt under Professor Dr. H.-J. Hoffmann and Dr. J@"urgen Buchner, and was translated with some changes and additions by Tim Josling. You can reach the authors at jnadler@gmx.net and tej@melbpc.org.au

(3)

A common term for procedures and functions

(4)

see files tree.h and tree.def

(5)

at the time of writing the most recent Version - the snapshot 2000/04/10

(6)

GNAT", at the time version 3.10p, described in http://www.gnat.com/papers/gnat94.ps, homepage http://www.gnat.com, developed in the Information Technology department of NYU http://cs.nyu.edu and obtainable for example from ftp://ftp.informatik.rwth-aachen.de/pub/mirror/cs.nyu.edu/pub/gnat or via the `student' link on the http://www.gnat.com site

(7)

`gpc', current version 2.0, developed under coordination of Jukka Virtanen jvt@kampi.hut.fi, obtainable from ftp://kampi.hut.fi/jtv/gnu-pascal/; the project homepage for the time being is http://agnes.dida.physik.uni-essen.de/~gnu-pascal/

(8)

This gives an average of 225,000 lines over 30 architectures or 7,500 lines of code per architecture

(9)

or modes, whose aim is storage management, see below

(10)

more on this later

(11)

Details on the requirements follow later

(12)

as requested by the provided command line paremeters

(13)

like `typedef' named types

(14)

why only almost? - see section section 14.3.5 Callback

(15)

see below under `poplevel'

(16)

the form { (followed by statements and declarations) }

(17)

See the explanation of pushdecl below

(18)

and is not merely local like statements, it must then just as for the keep != 0 case unconditionally create a `BLOCK'

(19)

thus a subdirectory `cp' for the language C++

(20)

meaning the directory, in which the distribution package was unpacked eg `gcc-2.7.2'

(21)

The author has always used the GNU utility; whether other linkers offer this facility I don't know, presumably though not. The GNU binder can be obtained by ftp; it is conained in the package `binutils'

(22)

for more details on `VPATH' see the documentation of GNU `make'

(23)

It is comprehensively explained in the source file `gcc.c'

(24)

often called 'pretty-printing'

(25)

which are, surprisingly, supported by the C front end

(26)

here it is understood as in C that the declarations of the local variables takes place within the body of the routine!

(27)

such as a destructor in C++

(28)

It would appear

(29)

thus not necessarily the real type, the nominal type will mostly be `integer_type_node'

(30)

`default' in C

(31)

must be a `TREE_LIST', which can be easily created from a `CHAIN' by using `listify' combined with `chainon' if needed as in the case where there are more than one parameters

(32)

Of great asssistance for the construction of this work was also the record of a presentation Kenner95a Kenner95b by Richard Kenner, who the author believes to be the unofficial leader of the GNU compiler project, at an academic conference (POPL95)

(33)

in commercial compilers this information is keenly kept secret, in order to protect themselves from undesired competition

(34)

translator's note: and also useful is the find-tag command in emacs combined with the etags utility


This document was generated on 24 January 2001 using texi2html 1.56k.