|Tiger's ESEQ email@example.com (2005-06-30)|
|Re: Tiger's ESEQ firstname.lastname@example.org (2005-07-02)|
|Re: Tiger's ESEQ email@example.com (Ken Rose) (2005-07-02)|
|From:||Ken Rose <firstname.lastname@example.org>|
|Date:||2 Jul 2005 20:26:13 -0400|
|Organization:||Posted via Supernews, http://www.supernews.com|
|Posted-Date:||02 Jul 2005 20:26:13 EDT|
> I have been reading Andrew Appel's Modern Compiler Design in "C".
> I am afraid I do not understand the ESEQ completely.
> I have been looking at other literature like the Dragon book,
> Engineering a compiler, and many more. I have not found the usage of
> ESEQ kind of instructions anywhere in them. I understand the
> ide-effect part, but how do we know for sure that some instruction will
> have a side-effect. How do you define a side-effect?
It's not about the ultimate machine instruction, it's about the
operation being translated. Consider a C expression like:
a[i++] = <something>
Consider just the i++ part. One simple way to translate that into
Appel's tree notation is something along these lines:
ESEQ(temp <- i)
(ESEQ(i <- i+1)
A comma expression as another natural application. It's really about
the structure of the tree, and representing it in a way that's actually
type-safe (and suitable for the ML version of the book), though if
you're writing in C you could yield to the temptation to use a SEQ instead.
Return to the
Search the comp.compilers archives again.