|Need: ANSI C to p-code compiler email@example.com (Vijay Chand) (2000-10-26)|
|Re: Need: ANSI C to p-code compiler firstname.lastname@example.org (2000-10-31)|
|Need: ANSI C to p-code compiler email@example.com (1992-11-04)|
|From:||firstname.lastname@example.org (Derek M Jones)|
|Date:||31 Oct 2000 14:34:11 -0500|
|Posted-Date:||31 Oct 2000 14:34:11 EST|
>Are there any free ANSI C compiler implementation (source) which
>generates some explicit intermediate code for simple stack machine?
>(or can be easily tailored to do that).
I don't know of any free ones. Ours costs real money.
>No code generation besides that is required, nor _any_ optimizations
>(besides may be simple constant pasting in expression trees).
We originally did no optimizations. But then silly things like
adding zero to an address to get the addres sof the first member of a
struct started to look like cutting our nose off to spite our face.
So some 'obvious' optimizations were done.
Hmm, what is simple constant foloding? We don't do any except in
contexts required by the standard. It means that the semantics are
guaranteed to be identical to the same values occurring in operands
that are objects.
>the compiler is about to be used for embedding into applications
>(maybe java or something else. So size is much more important than
The compiler source is 49k lines. lcc is about the same size (but excludes
Targeting the JVM? Quiet hard to do since you need to rely on undefined
behaviour (accessing arrays with types different from when they were
Return to the
Search the comp.compilers archives again.