From: <fwi...@us...> - 2009-09-22 22:45:48
|
Revision: 6804 http://jython.svn.sourceforge.net/jython/?rev=6804&view=rev Author: fwierzbicki Date: 2009-09-22 22:45:39 +0000 (Tue, 22 Sep 2009) Log Message: ----------- Put MethodHandle into call_function signature. Modified Paths: -------------- trunk/sandbox/wierzbicki/indy_jython/IndyDump.java Modified: trunk/sandbox/wierzbicki/indy_jython/IndyDump.java =================================================================== --- trunk/sandbox/wierzbicki/indy_jython/IndyDump.java 2009-09-22 18:00:39 UTC (rev 6803) +++ trunk/sandbox/wierzbicki/indy_jython/IndyDump.java 2009-09-22 22:45:39 UTC (rev 6804) @@ -136,8 +136,8 @@ mv.visitInsn(ICONST_0); mv.visitFieldInsn(GETSTATIC, "Hello", "self", "LHello;"); +////MethodHandle goes here mv.visitInsn(ACONST_NULL); -////mv.visitInsn(ICONST_0); mv.visitInsn(ACONST_NULL); mv.visitInsn(ACONST_NULL); @@ -161,8 +161,8 @@ mv.visitInsn(ICONST_0); mv.visitFieldInsn(GETSTATIC, "Hello", "self", "LHello;"); +////MethodHandle goes here mv.visitInsn(ACONST_NULL); -////mv.visitInsn(ICONST_1); mv.visitInsn(ACONST_NULL); mv.visitInsn(ACONST_NULL); @@ -207,13 +207,17 @@ mv.visitEnd(); } { -mv = cw.visitMethod(ACC_PUBLIC, "call_function", "(ILorg/python/core/PyFrame;Lorg/python/core/ThreadState;)Lorg/python/core/PyObject;", null, null); +mv = cw.visitMethod(ACC_PUBLIC, "call_function", "(Ljava/dyn/MethodHandle;Lorg/python/core/PyFrame;Lorg/python/core/ThreadState;)Lorg/python/core/PyObject;", null, null); mv.visitCode(); mv.visitFrame(Opcodes.F_NEW, 0, new Object[] {}, 0, new Object[] {}); mv.visitVarInsn(ALOAD, 0); mv.visitVarInsn(ALOAD, 2); mv.visitVarInsn(ALOAD, 3); -mv.visitVarInsn(ILOAD, 1); + +//MethodHandle +mv.visitVarInsn(ALOAD, 1); + +/* Label l0 = new Label(); Label l1 = new Label(); Label l2 = new Label(); @@ -228,9 +232,10 @@ mv.visitInsn(ARETURN); mv.visitLabel(l2); mv.visitFrame(Opcodes.F_NEW, 4, new Object[] {"Hello", Opcodes.INTEGER, "org/python/core/PyFrame", "org/python/core/ThreadState"}, 3, new Object[] {"Hello", "org/python/core/PyFrame", "org/python/core/ThreadState"}); +*/ mv.visitInsn(ACONST_NULL); mv.visitInsn(ARETURN); -mv.visitMaxs(4, 4); +mv.visitMaxs(5, 4); mv.visitEnd(); } cw.visitEnd(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |