From: <fwi...@us...> - 2009-10-03 00:09:39
|
Revision: 6827 http://jython.svn.sourceforge.net/jython/?rev=6827&view=rev Author: fwierzbicki Date: 2009-10-03 00:09:30 +0000 (Sat, 03 Oct 2009) Log Message: ----------- First nibble at using CodegenUtils. Modified Paths: -------------- trunk/jython/src/org/python/compiler/CodeCompiler.java Modified: trunk/jython/src/org/python/compiler/CodeCompiler.java =================================================================== --- trunk/jython/src/org/python/compiler/CodeCompiler.java 2009-10-02 20:29:01 UTC (rev 6826) +++ trunk/jython/src/org/python/compiler/CodeCompiler.java 2009-10-03 00:09:30 UTC (rev 6827) @@ -87,8 +87,8 @@ import org.objectweb.asm.Opcodes; import org.objectweb.asm.Type; import org.objectweb.asm.commons.Method; +import static org.python.util.CodegenUtils.*; - public class CodeCompiler extends Visitor implements Opcodes, ClassConstants { public static final Object Exit=new Integer(1); @@ -153,7 +153,7 @@ } public void getNone() throws IOException { - code.getstatic("org/python/core/Py", "None", $pyObj); + code.getstatic("org/python/core/Py", "None", ci(PyObject.class)); } public void loadFrame() throws Exception { @@ -278,7 +278,7 @@ if (classBody) { loadFrame(); - code.invokevirtual("org/python/core/PyFrame", "getf_locals", "()" + $pyObj); + code.invokevirtual("org/python/core/PyFrame", "getf_locals", sig(PyObject.class)); code.areturn(); } else { if (exit == null) { @@ -415,7 +415,7 @@ code.new_("org/python/core/PyFunction"); code.dup(); loadFrame(); - code.getfield("org/python/core/PyFrame", "f_globals", $pyObj); + code.getfield("org/python/core/PyFrame", "f_globals", ci(PyObject.class)); code.aload(defaults); code.freeLocal(defaults); @@ -1975,7 +1975,7 @@ code.freeLocal(defaultsArray); loadFrame(); - code.getfield("org/python/core/PyFrame", "f_globals", $pyObj); + code.getfield("org/python/core/PyFrame", "f_globals", ci(PyObject.class)); code.swap(); @@ -2215,7 +2215,7 @@ code.new_("org/python/core/PyFunction"); code.dup(); loadFrame(); - code.getfield("org/python/core/PyFrame", "f_globals", $pyObj); + code.getfield("org/python/core/PyFrame", "f_globals", ci(PyObject.class)); ScopeInfo scope = module.getScopeInfo(node); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |