commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kohs...@apache.org
Subject svn commit: r279258 - /jakarta/commons/sandbox/javaflow/trunk/src/java/org/apache/commons/javaflow/bytecode/transformation/bcel/BcelClassTransformer.java
Date Wed, 07 Sep 2005 06:28:58 GMT
Author: kohsuke
Date: Tue Sep  6 23:28:54 2005
New Revision: 279258

URL: http://svn.apache.org/viewcvs?rev=279258&view=rev
Log:
fixed a bug in capturing long/double in the operand stack

Modified:
    jakarta/commons/sandbox/javaflow/trunk/src/java/org/apache/commons/javaflow/bytecode/transformation/bcel/BcelClassTransformer.java

Modified: jakarta/commons/sandbox/javaflow/trunk/src/java/org/apache/commons/javaflow/bytecode/transformation/bcel/BcelClassTransformer.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/java/org/apache/commons/javaflow/bytecode/transformation/bcel/BcelClassTransformer.java?rev=279258&r1=279257&r2=279258&view=diff
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/java/org/apache/commons/javaflow/bytecode/transformation/bcel/BcelClassTransformer.java
(original)
+++ jakarta/commons/sandbox/javaflow/trunk/src/java/org/apache/commons/javaflow/bytecode/transformation/bcel/BcelClassTransformer.java
Tue Sep  6 23:28:54 2005
@@ -488,7 +488,13 @@
         for (int i = arguments.length - 1; i >= 0; i--) {
             Type type = arguments[i];
             insList.append(loadStackRecorder);
-            insList.append(new SWAP());
+            if(type.getSize()==1)
+                insList.append(InstructionFactory.SWAP);
+            else {
+                // TODO: is there more efficient way to do this?
+                insList.append(InstructionFactory.DUP_X2);
+                insList.append(InstructionFactory.POP);
+            }
             if (type instanceof BasicType) {
                 if (type.getSize() < 2 && !type.equals(Type.FLOAT)) {
                     type = Type.INT;



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message