Related articles |
---|
Intermediate code representations naran@sfu.ca (1992-07-19) |
Newsgroups: | comp.compilers |
From: | naran@sfu.ca (Travers Naran) |
Organization: | Simon Fraser University, Burnaby, B.C., Canada |
Date: | Sun, 19 Jul 1992 06:48:55 GMT |
Keywords: | optimize, design, question |
Hi, I am working on an experimental compiler just so I can learn how to
write a compiler. My university has saw fit to abandon it's formal
compiler courses in favour of learning about computer languages in
general. :-)
Anyways, I was having problems comming up with an intermediate code form
that was flexible enough for my language yet easy enough to use. Yes, I
have tried direct assembly code generation but I found it was a failure
and coupled with the fact that I lacked a really useful 68000 code
optimizer. Well, actually, when I say direct code generation was a
'failure', I mean it generated the correct code but was severely
ineffecient.
I used the quadruple (a.k.a. Three-address code) code format and found
that worked out quite well, I could interpret it almost immediately and I
could generate fairly effecient 68000 code. But the problem comes when I
have different data types all over the place. There is also the added
problem of passing parameters, but is relatively minor (I use a stack
machine for that).
Also, does anyone know of any really good sources for learning how to
represent data types? My compiler books seem to think it is a really minor
issue, but with object oriented programming and operator overloading, this
is becoming really important.
--
Travers Naran
Mail address: naran@fraser.sfu.ca or naran@sfu.ca
Simon Fraser University, British Columbia, Canada
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.