On Mon, 2004-05-10 at 12:46, Tom Tromey wrote: > >>>>> "Steven" == Steven Augart <[EMAIL PROTECTED]> writes: > > Steven> So, for the purposes of GNU Classpath's AWT code > Steven> (--portable-native-sync), is it reasonable to assume that they are, > Steven> indeed, 1, 5, and 10, or should the implementation check the values at > Steven> run time and cache the results? Since the Java language spec > Steven> expicitly allows the java source-to-byte-code compiler to inline the > Steven> values of static final constants, presumably the values can never > Steven> change in the future > > Yeah, in theory the values can't change. In practice, Sun has broken > this once or twice in the past, though honestly I doubt they would > bother changing these particular values. > > I'd say in a case like this you can do whatever you like, provided the > result is documented.
There is precedent for native code to simply #define these constants to avoid expensive lookups so feel free to do the same here. Could probably add it to the cp-tools version of javap even if it isn't there. Brian
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Classpath mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/classpath

