From: <zy...@us...> - 2010-08-22 06:39:28
|
Revision: 7101 http://jython.svn.sourceforge.net/jython/?rev=7101&view=rev Author: zyasoft Date: 2010-08-22 06:39:22 +0000 (Sun, 22 Aug 2010) Log Message: ----------- Module#addConstants incorrectly set the accessbility of the 'self' constant in the generated module bytecode to be final, but it can in fact be modified outside of the class initializer. Verified the regrtest passes with -Xcomp (except for test_jy_internals, but this looks like standard issues of working with GC in tests). Bumped bytecode magic. Thanks Ian Rogers for your analysis! Modified Paths: -------------- trunk/jython/NEWS trunk/jython/src/org/python/compiler/Module.java trunk/jython/src/org/python/core/imp.java Modified: trunk/jython/NEWS =================================================================== --- trunk/jython/NEWS 2010-08-21 03:56:21 UTC (rev 7100) +++ trunk/jython/NEWS 2010-08-22 06:39:22 UTC (rev 7101) @@ -2,6 +2,7 @@ Jython 2.5.2b2 Bugs Fixed + - [ 1611 ] Jython bytecode violated JLS, causing NPE on Sun's JVM when using -Xcomp option - [ 1643 ] Tools subdirectory still exists in trunk - [ 1455 ] Classes loaded dynamically from sys.path do not have their package defined - [ 1555 ] Jython does not publish MIME types via JSR 223 (ScriptEngine.getFactory().getMimeTypes() is empty). Modified: trunk/jython/src/org/python/compiler/Module.java =================================================================== --- trunk/jython/src/org/python/compiler/Module.java 2010-08-21 03:56:21 UTC (rev 7100) +++ trunk/jython/src/org/python/compiler/Module.java 2010-08-22 06:39:22 UTC (rev 7101) @@ -550,7 +550,7 @@ } void addConstants(Code c) throws IOException { - classfile.addField("self", "L" + classfile.name + ";", ACC_STATIC | ACC_FINAL); + classfile.addField("self", "L" + classfile.name + ";", ACC_STATIC); c.aload(0); c.putstatic(classfile.name, "self", "L" + classfile.name + ";"); Enumeration e = constants.elements(); Modified: trunk/jython/src/org/python/core/imp.java =================================================================== --- trunk/jython/src/org/python/core/imp.java 2010-08-21 03:56:21 UTC (rev 7100) +++ trunk/jython/src/org/python/core/imp.java 2010-08-22 06:39:22 UTC (rev 7101) @@ -21,7 +21,7 @@ private static final String UNKNOWN_SOURCEFILE = "<unknown>"; - private static final int APIVersion = 30; + private static final int APIVersion = 31; public static final int NO_MTIME = -1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |