[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A java DEBUG flag
From: |
Bryce McKinlay |
Subject: |
Re: A java DEBUG flag |
Date: |
Fri, 24 Nov 2000 23:21:12 +1300 |
Mark Wielaard wrote:
> > > If we used something like
> > > System.getProperty("gnu.java.io.serialisation.debugging") to set these
> > > constants (you can even do that in an interface)
> >
> > I don't think so ;-)
>
> What don't you think so?
> What I meant was something like the following:
>
> interface I {
> boolean SERIALISATION_DEBUG =
> Boolean.getBoolean("gnu.java.io.serialisation.debugging");
> }
But this is not a constant! It can only be evaluated at runtime. A bytecode
compiler or native compiler like gcj cannot determine the value of the flag, and
must emit a branch. Granted, a smart JIT will be able to take advantage of it
being a final field and eliminate the debug code from what it generates.
However,
if it is used extensively in the runtime then it is probable that the flag would
be evaluated before the system property is set, making it useless.
regards
[ bryce ]
- Re: A java DEBUG flag, (continued)
- Re: A java DEBUG flag, Kevin A. Burton, 2000/11/28
- Re: A java DEBUG flag, Bryce McKinlay, 2000/11/28
- Re: A java DEBUG flag, Brian Jones, 2000/11/28
- Re: A java DEBUG flag, Stuart Ballard, 2000/11/28
- Re: A java DEBUG flag, Brian Jones, 2000/11/29
- Re: A java DEBUG flag, Tom Tromey, 2000/11/29
- Re: A java DEBUG flag, Kevin A. Burton, 2000/11/28
Re: A java DEBUG flag, Mark Wielaard, 2000/11/23
Re: A java DEBUG flag, Kevin A. Burton, 2000/11/24
RE: A java DEBUG flag, Boehm, Hans, 2000/11/29
RE: A java DEBUG flag, Boehm, Hans, 2000/11/29
Re: A java DEBUG flag, Brian Jones, 2000/11/29
Re: A java DEBUG flag, Nic Ferrier, 2000/11/29
Re: A java DEBUG flag, Patrick Tullmann, 2000/11/29