Re: Need an interesting topic for an undergraduate project on Compilers

torbenm@diku.dk (Torben Ęgidius Mogensen)
Wed, 31 Aug 2011 11:15:31 +0200

          From comp.compilers

Related articles
[3 earlier articles]
Re: Need an interesting topic for an undergraduate project on Compiler bc@freeuk.com (BartC) (2011-08-09)
Re: Need an interesting topic for an undergraduate project on Compiler gene.ressler@gmail.com (Gene) (2011-08-10)
Re: Need an interesting topic for an undergraduate project on Compiler haberg-news@telia.com (Hans Aberg) (2011-08-10)
Re: Need an interesting topic for an undergraduate project on Compiler jgk@panix.com (2011-08-27)
Re: Need an interesting topic for an undergraduate project on Compiler cr88192@hotmail.com (BGB) (2011-08-31)
Re: Need an interesting topic for an undergraduate project on Compiler thomas.mertes@gmx.at (tm) (2011-08-30)
Re: Need an interesting topic for an undergraduate project on Compiler torbenm@diku.dk (2011-08-31)
Re: Need an interesting topic for an undergraduate project on Compiler bumens@dingens.org (Volker Birk) (2011-08-31)
Re: Need an interesting topic for an undergraduate project on Compiler cr88192@hotmail.com (BGB) (2011-09-01)
Re: Need an interesting topic for an undergraduate project on Compiler gneuner2@comcast.net (George Neuner) (2011-08-31)
Re: Need an interesting topic for an undergraduate project on Compiler redbrain@gcc.gnu.org (Philip Herron) (2011-09-03)
Re: Need an interesting topic for an undergraduate project on Compiler cbergstrom@pathscale.com (=?ISO-8859-1?Q?=22C=2E_Bergstr=F6m=22?=) (2011-09-03)
Re: Need an interesting topic for an undergraduate project on Compiler gneuner2@comcast.net (George Neuner) (2011-09-03)
[1 later articles]
| List of all articles for this month |
From: torbenm@diku.dk (Torben Ęgidius Mogensen)
Newsgroups: comp.compilers
Date: Wed, 31 Aug 2011 11:15:31 +0200
Organization: SunSITE.dk - Supporting Open source
References: 11-08-006 11-08-007 11-08-029
Keywords: translator, C
Posted-Date: 31 Aug 2011 09:33:20 EDT

jgk@panix.com (Joe keane) writes:


> Volker Birk <bumens@dingens.org> writes:
>>If you want to compile a programming language to assembler code
>
> I'm not sure why anyone would want to do this; if you have another
> language you can convert it to C code, and concentrate on what you are
> doing. If you find that the C->assembly step can be improved that is
> also useful.


C is not always well suited as a target language for a compiler (even
though it is often used for this purpose). For example:


  - Standard C does not support indirect jumps.


  - Few C compilers support tail-call optimisation.


  - C does not support multiple return values from a function call.


  - Exceptions are not supported and are difficult to implement
      efficiently and portably.


  - Finding the root set for tracing garbage collectors is not easy.


  - Multi-word integer arithmetic is not supported, even though hardware
      often does.


  - A lot of C behaviour is defined as implementation dependent, so you
      can not be sure your code works the same on all machines/compilers.


So there can be plenty of reasons to compile all the way to assembly
code. Or use something like LLVM as target.


Torben



Post a followup to this message

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