You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tc...@apache.org on 2012/10/05 15:58:40 UTC
svn commit: r1394532 -
/commons/sandbox/javaflow/trunk/src/main/java/org/apache/commons/javaflow/bytecode/transformation/asm/ContinuationMethodAdapter.java
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) {