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>speed).

The compiler source is 49k lines. lcc is about the same size (but excludes
a preprocessor).

Targeting the JVM? Quiet hard to do since you need to rely on undefined
behaviour (accessing arrays with types different from when they were
allocated).