Re: Is Assembler Language essential in compiler construction?

Ralph Boland <rpboland@gmail.com>
Tue, 10 Feb 2009 22:58:00 -0800 (PST)

          From comp.compilers

Related articles
Is Assembler Language essential in compiler construction? marco.m.petersen@gmail.com (2009-02-09)
Re: Is Assembler Language essential in compiler construction? mburrel@uwo.ca (Mike Burrell) (2009-02-10)
Re: Is Assembler Language essential in compiler construction? rpboland@gmail.com (Ralph Boland) (2009-02-10)
Re: Is Assembler Language essential in compiler construction? bartc@freeuk.com (Bartc) (2009-02-11)
Re: Is Assembler Language essential in compiler construction? tim.d.richards@gmail.com (Tim) (2009-02-11)
Re: Is Assembler Language essential in compiler construction? walter@bytecraft.com (Walter Banks) (2009-02-11)
Re: Is Assembler Language essential in compiler construction? haberg_20080406@math.su.se (Hans Aberg) (2009-02-11)
Re: Is Assembler Language essential in compiler construction? torbenm@pc-003.diku.dk (2009-02-11)
Re: Is Assembler Language essential in compiler construction? anton@mips.complang.tuwien.ac.at (2009-02-11)
[16 later articles]
| List of all articles for this month |
From: Ralph Boland <rpboland@gmail.com>
Newsgroups: comp.compilers
Date: Tue, 10 Feb 2009 22:58:00 -0800 (PST)
Organization: Compilers Central
References: 09-02-021
Keywords: assembler
Posted-Date: 11 Feb 2009 05:45:42 EST

On Feb 9, 3:34 am, marco.m.peter...@gmail.com wrote:
> Is Assembler Language essential in compiler construction? I've read a
> few e-Books on compiler construction and it always says that knowledge
> of assembly is essential.


Frankly, most university first courses on compilers don't spend much
time on the back end of compilers; there just isn't time. And the
assembly languages of most modern processors are just too complex. I
would like to see the Java virtual machine or some other used virtual
machine be the target language for a first course on compilers, if
that is not already too much information. Students would find this
more interesting and useful than a faked machine language and more
reasonable than a real assembly language.


A slightly different option would be to compile to some intermediate
language used in a real compiler such that the students could use the
real compiler to finish the translation into machine code. This would
require a cooperative compiler with a reasonably simple intermediate
language.


The back end is where the real compiler work is done though, so a
second course, possibly at the graduate level, that dealt with
compiler back ends would be useful. Such a course could deal with
translating virtual machine code into real machine code. I recommend
compiling to a processor whose machine language is not too complex,
and is really used today, say for embedded applications.


I think a compiler book using these ideas would be very successful
especially if universities used it in their compiler courses. Wish I
had sufficient knowledge to write it but I only know front ends well.


Ralph Boland
[Holub's Compiler Design in C used a small assemblerish subset of C
as its target language which I thought worked quite well. -John]



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.