commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r1392549 - in /commons/sandbox/nabla/trunk: ./ src/main/java/org/apache/commons/nabla/forward/analysis/ src/main/java/org/apache/commons/nabla/forward/instructions/
Date Mon, 01 Oct 2012 19:31:42 GMT
Author: luc
Date: Mon Oct  1 19:31:42 2012
New Revision: 1392549

URL: http://svn.apache.org/viewvc?rev=1392549&view=rev
Log:
Use regular indentation throughout the project.

Modified:
    commons/sandbox/nabla/trunk/checkstyle.xml
    commons/sandbox/nabla/trunk/src/main/java/org/apache/commons/nabla/forward/analysis/ClassDifferentiator.java
    commons/sandbox/nabla/trunk/src/main/java/org/apache/commons/nabla/forward/analysis/MethodDifferentiator.java
    commons/sandbox/nabla/trunk/src/main/java/org/apache/commons/nabla/forward/instructions/InvokeStaticTransformer.java

Modified: commons/sandbox/nabla/trunk/checkstyle.xml
URL: http://svn.apache.org/viewvc/commons/sandbox/nabla/trunk/checkstyle.xml?rev=1392549&r1=1392548&r2=1392549&view=diff
==============================================================================
--- commons/sandbox/nabla/trunk/checkstyle.xml (original)
+++ commons/sandbox/nabla/trunk/checkstyle.xml Mon Oct  1 19:31:42 2012
@@ -137,7 +137,13 @@
     <!-- Use final wherever possible -->
     <module name="FinalLocalVariable"/>
     <module name="FinalParameters"/>
-    
+
+    <!-- General indentation settings -->
+    <module name="Indentation">
+      <property name="basicOffset" value="4"/>
+      <property name="caseIndent" value="4"/>
+    </module>
+
     <!-- <module name="TodoComment" /> -->
 
   </module>

Modified: commons/sandbox/nabla/trunk/src/main/java/org/apache/commons/nabla/forward/analysis/ClassDifferentiator.java
URL: http://svn.apache.org/viewvc/commons/sandbox/nabla/trunk/src/main/java/org/apache/commons/nabla/forward/analysis/ClassDifferentiator.java?rev=1392549&r1=1392548&r2=1392549&view=diff
==============================================================================
--- commons/sandbox/nabla/trunk/src/main/java/org/apache/commons/nabla/forward/analysis/ClassDifferentiator.java
(original)
+++ commons/sandbox/nabla/trunk/src/main/java/org/apache/commons/nabla/forward/analysis/ClassDifferentiator.java
Mon Oct  1 19:31:42 2012
@@ -231,6 +231,6 @@ public class ClassDifferentiator {
                                INIT, Type.getMethodDescriptor(Type.VOID_TYPE, Type.getType(Throwable.class)));
         method.visitInsn(Opcodes.ATHROW);
         classNode.methods.add(method);
-   }
+    }
 
 }

Modified: commons/sandbox/nabla/trunk/src/main/java/org/apache/commons/nabla/forward/analysis/MethodDifferentiator.java
URL: http://svn.apache.org/viewvc/commons/sandbox/nabla/trunk/src/main/java/org/apache/commons/nabla/forward/analysis/MethodDifferentiator.java?rev=1392549&r1=1392548&r2=1392549&view=diff
==============================================================================
--- commons/sandbox/nabla/trunk/src/main/java/org/apache/commons/nabla/forward/analysis/MethodDifferentiator.java
(original)
+++ commons/sandbox/nabla/trunk/src/main/java/org/apache/commons/nabla/forward/analysis/MethodDifferentiator.java
Mon Oct  1 19:31:42 2012
@@ -391,91 +391,91 @@ public class MethodDifferentiator {
         final boolean stack0Converted = (size > 1) && converted.contains(frame.getStack(size
- 1));
 
         switch(insn.getOpcode()) {
-        case Opcodes.DLOAD :
-            useLocal(((VarInsnNode) insn).var, 4);
-            return new DLoadTransformer().getReplacement(insn, this);
-        case Opcodes.DALOAD :
-            // TODO add support for DALOAD differentiation
-            throw new RuntimeException("DALOAD not handled yet");
-        case Opcodes.DSTORE :
-            useLocal(((VarInsnNode) insn).var, 4);
-            return new DStoreTransformer().getReplacement(insn, this);
-        case Opcodes.DASTORE :
-            // TODO add support for DASTORE differentiation
-            throw new RuntimeException("DASTORE not handled yet");
-        case Opcodes.DUP2 :
-            return new Dup2Transformer().getReplacement(insn, this);
-        case Opcodes.POP2 :
-            return new Pop2Transformer().getReplacement(insn, this);
-        case Opcodes.DUP2_X1 :
-            return new Dup2X1Transformer().getReplacement(insn, this);
-        case Opcodes.DUP2_X2 :
-            return new Dup2X2Transformer(stack0Converted, stack1Converted).getReplacement(insn,
this);
-        case Opcodes.DADD :
-            return new DAddTransformer(stack0Converted, stack1Converted).getReplacement(insn,
this);
-        case Opcodes.DSUB :
-            return new DSubTransformer(stack0Converted, stack1Converted).getReplacement(insn,
this);
-        case Opcodes.DMUL :
-            return new DMulTransformer(stack0Converted, stack1Converted).getReplacement(insn,
this);
-        case Opcodes.DDIV :
-            return new DDivTransformer(stack0Converted, stack1Converted).getReplacement(insn,
this);
-        case Opcodes.DREM :
-            return new DRemTransformer(stack0Converted, stack1Converted).getReplacement(insn,
this);
-        case Opcodes.DNEG :
-            return new DNegTransformer().getReplacement(insn, this);
-        case Opcodes.DCONST_0 :
-        case Opcodes.DCONST_1 :
-        case Opcodes.LDC :
-        case Opcodes.I2D :
-        case Opcodes.L2D :
-        case Opcodes.F2D :
-            return new WideningTransformer().getReplacement(insn, this);
-        case Opcodes.D2I :
-        case Opcodes.D2L :
-        case Opcodes.D2F :
-            return new NarrowingTransformer().getReplacement(insn, this);
-        case Opcodes.DCMPL :
-        case Opcodes.DCMPG :
-            return new DcmpTransformer(stack0Converted, stack1Converted).getReplacement(insn,
this);
-        case Opcodes.DRETURN :
-            // TODO the constructor parameter forced to true seems strange...
-            return new DReturnTransformer(true).getReplacement(insn, this);
-        case Opcodes.GETSTATIC :
-            // TODO add support for GETSTATIC differentiation
-            throw new RuntimeException("GETSTATIC not handled yet");
-        case Opcodes.PUTSTATIC :
-            // TODO add support for PUTSTATIC differentiation
-            throw new RuntimeException("PUTSTATIC not handled yet");
-        case Opcodes.GETFIELD :
-            return replaceGetField((FieldInsnNode) insn);
-        case Opcodes.PUTFIELD :
-            // TODO add support for PUTFIELD differentiation
-            throw new RuntimeException("PUTFIELD not handled yet");
-        case Opcodes.INVOKEVIRTUAL :
-            // TODO add support for INVOKEVIRTUAL differentiation
-            throw new RuntimeException("INVOKEVIRTUAL not handled yet");
-        case Opcodes.INVOKESPECIAL :
-            // TODO add support for INVOKESPECIAL differentiation
-            throw new RuntimeException("INVOKESPECIAL not handled yet");
-        case Opcodes.INVOKESTATIC :
-            return new InvokeStaticTransformer(stack0Converted, stack1Converted).getReplacement(insn,
this);
-        case Opcodes.INVOKEINTERFACE :
-            // TODO add support for INVOKEINTERFACE differentiation
-            throw new RuntimeException("INVOKEINTERFACE not handled yet");
-        case Opcodes.INVOKEDYNAMIC :
-            // TODO add support for INVOKEDYNAMIC differentiation
-            throw new RuntimeException("INVOKEDYNAMIC not handled yet");
-        case Opcodes.NEWARRAY :
-            // TODO add support for NEWARRAY differentiation
-            throw new RuntimeException("NEWARRAY not handled yet");
-        case Opcodes.ANEWARRAY :
-            // TODO add support for ANEWARRAY differentiation
-            throw new RuntimeException("ANEWARRAY not handled yet");
-        case Opcodes.MULTIANEWARRAY :
-            // TODO add support for MULTIANEWARRAY differentiation
-            throw new RuntimeException("MULTIANEWARRAY not handled yet");
-        default:
-            throw new DifferentiationException(NablaMessages.UNABLE_TO_HANDLE_INSTRUCTION,
insn.getOpcode());
+            case Opcodes.DLOAD :
+                useLocal(((VarInsnNode) insn).var, 4);
+                return new DLoadTransformer().getReplacement(insn, this);
+            case Opcodes.DALOAD :
+                // TODO add support for DALOAD differentiation
+                throw new RuntimeException("DALOAD not handled yet");
+            case Opcodes.DSTORE :
+                useLocal(((VarInsnNode) insn).var, 4);
+                return new DStoreTransformer().getReplacement(insn, this);
+            case Opcodes.DASTORE :
+                // TODO add support for DASTORE differentiation
+                throw new RuntimeException("DASTORE not handled yet");
+            case Opcodes.DUP2 :
+                return new Dup2Transformer().getReplacement(insn, this);
+            case Opcodes.POP2 :
+                return new Pop2Transformer().getReplacement(insn, this);
+            case Opcodes.DUP2_X1 :
+                return new Dup2X1Transformer().getReplacement(insn, this);
+            case Opcodes.DUP2_X2 :
+                return new Dup2X2Transformer(stack0Converted, stack1Converted).getReplacement(insn,
this);
+            case Opcodes.DADD :
+                return new DAddTransformer(stack0Converted, stack1Converted).getReplacement(insn,
this);
+            case Opcodes.DSUB :
+                return new DSubTransformer(stack0Converted, stack1Converted).getReplacement(insn,
this);
+            case Opcodes.DMUL :
+                return new DMulTransformer(stack0Converted, stack1Converted).getReplacement(insn,
this);
+            case Opcodes.DDIV :
+                return new DDivTransformer(stack0Converted, stack1Converted).getReplacement(insn,
this);
+            case Opcodes.DREM :
+                return new DRemTransformer(stack0Converted, stack1Converted).getReplacement(insn,
this);
+            case Opcodes.DNEG :
+                return new DNegTransformer().getReplacement(insn, this);
+            case Opcodes.DCONST_0 :
+            case Opcodes.DCONST_1 :
+            case Opcodes.LDC :
+            case Opcodes.I2D :
+            case Opcodes.L2D :
+            case Opcodes.F2D :
+                return new WideningTransformer().getReplacement(insn, this);
+            case Opcodes.D2I :
+            case Opcodes.D2L :
+            case Opcodes.D2F :
+                return new NarrowingTransformer().getReplacement(insn, this);
+            case Opcodes.DCMPL :
+            case Opcodes.DCMPG :
+                return new DcmpTransformer(stack0Converted, stack1Converted).getReplacement(insn,
this);
+            case Opcodes.DRETURN :
+                // TODO the constructor parameter forced to true seems strange...
+                return new DReturnTransformer(true).getReplacement(insn, this);
+            case Opcodes.GETSTATIC :
+                // TODO add support for GETSTATIC differentiation
+                throw new RuntimeException("GETSTATIC not handled yet");
+            case Opcodes.PUTSTATIC :
+                // TODO add support for PUTSTATIC differentiation
+                throw new RuntimeException("PUTSTATIC not handled yet");
+            case Opcodes.GETFIELD :
+                return replaceGetField((FieldInsnNode) insn);
+            case Opcodes.PUTFIELD :
+                // TODO add support for PUTFIELD differentiation
+                throw new RuntimeException("PUTFIELD not handled yet");
+            case Opcodes.INVOKEVIRTUAL :
+                // TODO add support for INVOKEVIRTUAL differentiation
+                throw new RuntimeException("INVOKEVIRTUAL not handled yet");
+            case Opcodes.INVOKESPECIAL :
+                // TODO add support for INVOKESPECIAL differentiation
+                throw new RuntimeException("INVOKESPECIAL not handled yet");
+            case Opcodes.INVOKESTATIC :
+                return new InvokeStaticTransformer(stack0Converted, stack1Converted).getReplacement(insn,
this);
+            case Opcodes.INVOKEINTERFACE :
+                // TODO add support for INVOKEINTERFACE differentiation
+                throw new RuntimeException("INVOKEINTERFACE not handled yet");
+            case Opcodes.INVOKEDYNAMIC :
+                // TODO add support for INVOKEDYNAMIC differentiation
+                throw new RuntimeException("INVOKEDYNAMIC not handled yet");
+            case Opcodes.NEWARRAY :
+                // TODO add support for NEWARRAY differentiation
+                throw new RuntimeException("NEWARRAY not handled yet");
+            case Opcodes.ANEWARRAY :
+                // TODO add support for ANEWARRAY differentiation
+                throw new RuntimeException("ANEWARRAY not handled yet");
+            case Opcodes.MULTIANEWARRAY :
+                // TODO add support for MULTIANEWARRAY differentiation
+                throw new RuntimeException("MULTIANEWARRAY not handled yet");
+            default:
+                throw new DifferentiationException(NablaMessages.UNABLE_TO_HANDLE_INSTRUCTION,
insn.getOpcode());
         }
 
     }

Modified: commons/sandbox/nabla/trunk/src/main/java/org/apache/commons/nabla/forward/instructions/InvokeStaticTransformer.java
URL: http://svn.apache.org/viewvc/commons/sandbox/nabla/trunk/src/main/java/org/apache/commons/nabla/forward/instructions/InvokeStaticTransformer.java?rev=1392549&r1=1392548&r2=1392549&view=diff
==============================================================================
--- commons/sandbox/nabla/trunk/src/main/java/org/apache/commons/nabla/forward/instructions/InvokeStaticTransformer.java
(original)
+++ commons/sandbox/nabla/trunk/src/main/java/org/apache/commons/nabla/forward/instructions/InvokeStaticTransformer.java
Mon Oct  1 19:31:42 2012
@@ -93,7 +93,7 @@ public class InvokeStaticTransformer imp
                         list.add(new MethodInsnNode(Opcodes.INVOKEVIRTUAL,
                                                     DS_TYPE.getInternalName(), methodInsn.name,
                                                     Type.getMethodDescriptor(DS_TYPE, DS_TYPE)));
-                   }
+                    }
                 } else {
 
                     // initial stack state: x, ds_y



Mime
View raw message