PatchSet 5617 Date: 2005/03/27 16:05:39 Author: guilhem Branch: HEAD Tag: (none) Log: Fix for mutable final static fields.
* kaffe/kaffevm/kaffe.def (GETSTATIC, FIELD_IS_CONSTANT): Removed inline optimization because final fields can be mutable. Reported by: Daniel Bonniot <[EMAIL PROTECTED]> Members: ChangeLog:1.3789->1.3790 kaffe/kaffevm/kaffe.def:1.38->1.39 Index: kaffe/ChangeLog diff -u kaffe/ChangeLog:1.3789 kaffe/ChangeLog:1.3790 --- kaffe/ChangeLog:1.3789 Sun Mar 27 03:18:23 2005 +++ kaffe/ChangeLog Sun Mar 27 16:05:39 2005 @@ -1,3 +1,11 @@ +2005-03-27 Guilhem Lavaux <[EMAIL PROTECTED]> + + * kaffe/kaffevm/kaffe.def + (GETSTATIC, FIELD_IS_CONSTANT): Removed inline optimization because + final fields can be mutable. + + Reported by: Daniel Bonniot <[EMAIL PROTECTED]> + 2005-03-27 Gerrit P. Haase <[EMAIL PROTECTED]> * include/jsyscall.h: Whitespace cleanups. Index: kaffe/kaffe/kaffevm/kaffe.def diff -u kaffe/kaffe/kaffevm/kaffe.def:1.38 kaffe/kaffe/kaffevm/kaffe.def:1.39 --- kaffe/kaffe/kaffevm/kaffe.def:1.38 Sat Mar 26 05:13:58 2005 +++ kaffe/kaffe/kaffevm/kaffe.def Sun Mar 27 16:05:42 2005 @@ -2182,8 +2182,17 @@ softcall_initialise_class(c); \ } +/* + * We cannot do this optimization as final fields can be changed by JNI calls. + * However I leave the possibility of a future optimization by leaving the code in + * there. + */ +#if 0 #define FIELD_IS_CONSTANT() \ field_class()->state==CSTATE_COMPLETE && (field_field()->accflags&ACC_FINAL)!=0 +#else +#define FIELD_IS_CONSTANT() 0 +#endif define_insn(GETSTATIC) { _______________________________________________ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe