From: <fwi...@us...> - 2009-07-31 15:33:32
|
Revision: 6614 http://jython.svn.sourceforge.net/jython/?rev=6614&view=rev Author: fwierzbicki Date: 2009-07-31 15:33:23 +0000 (Fri, 31 Jul 2009) Log Message: ----------- Add @Overides, remove unused import, fix a shadowed variable. Modified Paths: -------------- trunk/jython/src/org/python/compiler/ClassFile.java trunk/jython/src/org/python/compiler/CodeCompiler.java trunk/jython/src/org/python/compiler/LineNumberTable.java trunk/jython/src/org/python/compiler/Module.java trunk/jython/src/org/python/compiler/SymInfo.java Modified: trunk/jython/src/org/python/compiler/ClassFile.java =================================================================== --- trunk/jython/src/org/python/compiler/ClassFile.java 2009-07-31 14:41:13 UTC (rev 6613) +++ trunk/jython/src/org/python/compiler/ClassFile.java 2009-07-31 15:33:23 UTC (rev 6614) @@ -2,7 +2,6 @@ package org.python.compiler; import java.io.ByteArrayOutputStream; -import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; Modified: trunk/jython/src/org/python/compiler/CodeCompiler.java =================================================================== --- trunk/jython/src/org/python/compiler/CodeCompiler.java 2009-07-31 14:41:13 UTC (rev 6613) +++ trunk/jython/src/org/python/compiler/CodeCompiler.java 2009-07-31 15:33:23 UTC (rev 6614) @@ -841,10 +841,10 @@ Future.checkFromFuture(node); // future stmt support setline(node); code.ldc(node.getInternalModule()); - java.util.List<alias> names = node.getInternalNames(); - if (names == null || names.size() == 0) { + java.util.List<alias> aliases = node.getInternalNames(); + if (aliases == null || aliases.size() == 0) { throw new ParseException("Internel parser error", node); - } else if (names.size() == 1 && names.get(0).getInternalName().equals("*")) { + } else if (aliases.size() == 1 && aliases.get(0).getInternalName().equals("*")) { if (node.getInternalLevel() > 0) { throw new ParseException("'import *' not allowed with 'from .'", node); } @@ -870,9 +870,9 @@ } else { java.util.List<String> fromNames = new ArrayList<String>();//[names.size()]; java.util.List<String> asnames = new ArrayList<String>();//[names.size()]; - for (int i = 0; i < names.size(); i++) { - fromNames.add(names.get(i).getInternalName()); - asnames.add(names.get(i).getInternalAsname()); + for (int i = 0; i < aliases.size(); i++) { + fromNames.add(aliases.get(i).getInternalName()); + asnames.add(aliases.get(i).getInternalAsname()); if (asnames.get(i) == null) asnames.set(i, fromNames.get(i)); } @@ -893,11 +893,11 @@ } code.invokestatic("org/python/core/imp", "importFrom", "(" + $str + $strArr + $pyFrame + "I" + ")" + $pyObjArr); int tmp = storeTop(); - for (int i = 0; i < names.size(); i++) { + for (int i = 0; i < aliases.size(); i++) { code.aload(tmp); code.iconst(i); code.aaload(); - set(new Name(names.get(i), asnames.get(i), expr_contextType.Store)); + set(new Name(aliases.get(i), asnames.get(i), expr_contextType.Store)); } code.freeLocal(tmp); } Modified: trunk/jython/src/org/python/compiler/LineNumberTable.java =================================================================== --- trunk/jython/src/org/python/compiler/LineNumberTable.java 2009-07-31 14:41:13 UTC (rev 6613) +++ trunk/jython/src/org/python/compiler/LineNumberTable.java 2009-07-31 15:33:23 UTC (rev 6614) @@ -7,7 +7,7 @@ import java.io.IOException; /** - * @Deprecated Not used. + * @Deprecated Not used. Delete in 2.6. */ public class LineNumberTable { int attName; Modified: trunk/jython/src/org/python/compiler/Module.java =================================================================== --- trunk/jython/src/org/python/compiler/Module.java 2009-07-31 14:41:13 UTC (rev 6613) +++ trunk/jython/src/org/python/compiler/Module.java 2009-07-31 15:33:23 UTC (rev 6614) @@ -451,7 +451,7 @@ int nparamcell = scope.jy_paramcells.size(); if(nparamcell > 0) { Map<String, SymInfo> tbl = scope.tbl; - List paramcells = scope.jy_paramcells; + List<String> paramcells = scope.jy_paramcells; for(int i = 0; i < nparamcell; i++) { c.aload(1); SymInfo syminf = tbl.get(paramcells.get(i)); Modified: trunk/jython/src/org/python/compiler/SymInfo.java =================================================================== --- trunk/jython/src/org/python/compiler/SymInfo.java 2009-07-31 14:41:13 UTC (rev 6613) +++ trunk/jython/src/org/python/compiler/SymInfo.java 2009-07-31 15:33:23 UTC (rev 6614) @@ -17,6 +17,7 @@ public int env_index; + @Override public String toString() { return "SymInfo[" + flags + " " + locals_index + " " + env_index + "]"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |