djrieger / mjplusplus

A compiler for the MiniJava language
http://djrieger.github.io/mjplusplus/doc/doxygen/html/
6 stars 1 forks source link

Don't create System/Out objects in firm #92

Closed ratefuchs closed 9 years ago

ratefuchs commented 9 years ago

It is only used for computation of the this-pointer for System.out.println(), which is ignored in this function.

We can instead check at each function call whether we have System.out.println() and use a null pointer as this for the function call. This saves us adress computations (at least once per non-inlined function (if we have load-store-optimization)) and the creation of System/Out instances (once per program).

It would also simplify our firm graphs.