I think it would be useful to have a java file somewhere that defines
constants which can be used to enable/disable bits of java code at
compile time. The serialized object dumping facility in
ObjectInputStream, for example, currently adds a lot of overhead even
when its turned off, because the java code makes calls into native code
regardless of whether debugging is enabled or not. By setting a constant
somewhere, the compiler can optimize it out when not doing a debug
build.
I propose an interface (this ensures that only constants can be defined)
called gnu.classpath.Flags (or CompileSettings? DebugFlags?) which would
be generated at configure time from a Flags.java.in, and would change
based on whether "--enable-libgcj-debug" (or the classpath equivilant)
was specified at configure time.
Initially it will look something like this:
package gnu.classpath;
public interface Flags
{
boolean SERIALIZATION_DEBUGGING = true;
}
Comments?
regards
[ bryce ]
_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath