Update of /cvsroot/jython/jython/org/python/compiler
In directory usw-pr-cvs1:/tmp/cvs-serv12247
Modified Files:
JavaMaker.java
Log Message:
addProxy(): Moved proxy init call into its own __initProxy__ method. Call
this method from ctor.
Index: JavaMaker.java
===================================================================
RCS file: /cvsroot/jython/jython/org/python/compiler/JavaMaker.java,v
retrieving revision 2.7
retrieving revision 2.8
diff -C2 -r2.7 -r2.8
*** JavaMaker.java 2000/10/19 18:10:28 2.7
--- JavaMaker.java 2001/02/14 22:23:40 2.8
***************
*** 69,75 ****
callSuper(code, "<init>", name, parameters, null, sig);
code.aload(0);
code.ldc(pythonModule);
code.ldc(pythonClass);
! getArgs(code, parameters);
makeStrings(code, packages);
--- 69,93 ----
callSuper(code, "<init>", name, parameters, null, sig);
code.aload(0);
+ getArgs(code, parameters);
+
+ int initProxy = code.pool.Methodref(
+ classfile.name, "__initProxy__",
+ "([Ljava/lang/Object;)V");
+ code.invokevirtual(initProxy);
+ code.return_();
+ }
+
+ public void addProxy() throws Exception {
+ if (methods != null)
+ super.addProxy();
+
+ // _initProxy method
+ Code code = classfile.addMethod("__initProxy__", "([Ljava/lang/Object;)V", Modifier.PUBLIC);
+
+ code.aload(0);
code.ldc(pythonModule);
code.ldc(pythonClass);
!
! code.aload(1);
makeStrings(code, packages);
***************
*** 83,91 ****
code.invokestatic(initProxy);
code.return_();
- }
- public void addProxy() throws Exception {
- if (methods != null)
- super.addProxy();
if (main)
addMain();
--- 101,105 ----
|