|Two-pass C compilers email@example.com (1992-08-15)|
|Re: Two-pass C compilers behrenss@Informatik.TU-Muenchen.DE (1992-08-16)|
|Re: Two-pass C compilers firstname.lastname@example.org (1992-08-16)|
|Re: Two-pass C compilers email@example.com (1992-08-16)|
|Re: Two-pass C compilers firstname.lastname@example.org (Gary Merrill) (1992-08-17)|
|Re: Two-pass C compilers email@example.com (1992-08-18)|
|Re: Two-pass C compilers mcrware!adam@uunet.UU.NET (1992-08-19)|
|From:||mcrware!adam@uunet.UU.NET (Adam Goldberg)|
|Organization:||Microware Systems Corp., Des Moines, Iowa|
|Date:||Wed, 19 Aug 1992 14:31:04 GMT|
behrenss@Informatik.TU-Muenchen.DE (Soenke Behrens) writes:
>Hmmm ... beat me if I something silly, but: Is there any way around
>a two-pass compiler? (Or even more passes)
>First pass: Reading in the source, preprocessing it, building a symbol table.
>Second pass: Generate p-Code
>Third pass: Optimize p-Code (Note: Do not mix with 2nd pass or you are
>in deep trouble)
>Fourth pass: Generate native code in linkable object file
Perhaps I'm dense, but...
Is the 'First Pass' (as defined by Soenke) the preprocessor? Even if it
is, there's no great trick (seems to me) to preprocess, build a symbol
table and output unoptimized p-Code all in the first pass through the
source. At that point, you've got p-Code (which is essentially an
internal data representation of the source) to optimize, translate into
assembler and assemble. I would call this 1 pass for the following
o The source code is read ONCE only.
o Take as many passes though the p-Code as you want; the p-Code is
(essentially) an internal representation of the partially compiled
source. Chomp on that N times, and you're still only playing with
internal data--hence, you have a 1 pass compiler, not a N+1 pass
o The assembly output is again only an internal representation.
Assembling it is translating internal representation(s) into output.
Not a separate pass.
firstname.lastname@example.org, or ...!uunet!mcrware!adamg
Return to the
Search the comp.compilers archives again.