fixed code generation for compiling constant expressions