commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tcu...@apache.org
Subject svn commit: r1394532 - /commons/sandbox/javaflow/trunk/src/main/java/org/apache/commons/javaflow/bytecode/transformation/asm/ContinuationMethodAdapter.java
Date Fri, 05 Oct 2012 13:58:40 GMT
Author: tcurdt
Date: Fri Oct  5 13:58:40 2012
New Revision: 1394532

URL: http://svn.apache.org/viewvc?rev=1394532&view=rev
Log:
fix from Stephane Godbillon (@sgodbillon)

Modified:
    commons/sandbox/javaflow/trunk/src/main/java/org/apache/commons/javaflow/bytecode/transformation/asm/ContinuationMethodAdapter.java

Modified: commons/sandbox/javaflow/trunk/src/main/java/org/apache/commons/javaflow/bytecode/transformation/asm/ContinuationMethodAdapter.java
URL: http://svn.apache.org/viewvc/commons/sandbox/javaflow/trunk/src/main/java/org/apache/commons/javaflow/bytecode/transformation/asm/ContinuationMethodAdapter.java?rev=1394532&r1=1394531&r2=1394532&view=diff
==============================================================================
--- commons/sandbox/javaflow/trunk/src/main/java/org/apache/commons/javaflow/bytecode/transformation/asm/ContinuationMethodAdapter.java
(original)
+++ commons/sandbox/javaflow/trunk/src/main/java/org/apache/commons/javaflow/bytecode/transformation/asm/ContinuationMethodAdapter.java
Fri Oct  5 13:58:40 2012
@@ -276,7 +276,13 @@ public final class ContinuationMethodAda
             }
 
             mv.visitVarInsn(ALOAD, stackRecorderVar);
-            mv.visitIntInsn(BIPUSH, currentIndex);  // TODO optimize to iconst_0...
+            if(currentIndex >= 128) {
+              // if > 127 then it's a SIPUSH, not a BIPUSH...
+              mv.visitIntInsn(SIPUSH, currentIndex);
+            } else {
+              // TODO optimize to iconst_0...
+              mv.visitIntInsn(BIPUSH, currentIndex);  
+            }
             mv.visitMethodInsn(INVOKEVIRTUAL, STACK_RECORDER, "pushInt", "(I)V");
 
             if (currentFrame instanceof MonitoringFrame) {



Mime
View raw message