[kaffe] CVS kaffe (guilhem): Fix for mutable final static fields.
Kaffe CVS
cvs-commits at kaffe.org
Sun Mar 27 08:10:25 PST 2005
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 <Daniel.Bonniot at inria.fr>
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 <guilhem at kaffe.org>
+
+ * kaffe/kaffevm/kaffe.def
+ (GETSTATIC, FIELD_IS_CONSTANT): Removed inline optimization because
+ final fields can be mutable.
+
+ Reported by: Daniel Bonniot <Daniel.Bonniot at inria.fr>
+
2005-03-27 Gerrit P. Haase <gp at familiehaase.de>
* 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)
{
More information about the kaffe
mailing list