commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r1392845 - /commons/sandbox/nabla/trunk/src/main/java/org/apache/commons/nabla/forward/analysis/ClassDifferentiator.java
Date Tue, 02 Oct 2012 11:20:31 GMT
Author: luc
Date: Tue Oct  2 11:20:30 2012
New Revision: 1392845

URL: http://svn.apache.org/viewvc?rev=1392845&view=rev
Log:
Replaced literal String manipulation by ASM Type features.

Modified:
    commons/sandbox/nabla/trunk/src/main/java/org/apache/commons/nabla/forward/analysis/ClassDifferentiator.java

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=1392845&r1=1392844&r2=1392845&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
Tue Oct  2 11:20:30 2012
@@ -122,7 +122,7 @@ public class ClassDifferentiator {
                         primitiveNode.name + "_NablaForwardModeUnivariateDerivative",
                         null, Type.getType(Object.class).getInternalName(),
                         new String[] {
-                            UnivariateDifferentiableFunction.class.getName().replace('.',
'/')
+                            Type.getType(UnivariateDifferentiableFunction.class).getInternalName()
                         });
 
         // add boilerplate code
@@ -181,7 +181,7 @@ public class ClassDifferentiator {
                            null, null);
         constructor.visitVarInsn(Opcodes.ALOAD, 0);
         constructor.visitMethodInsn(Opcodes.INVOKESPECIAL, Type.getType(Object.class).getInternalName(),
-                                    INIT, "()V");
+                                    INIT, Type.getMethodDescriptor(Type.VOID_TYPE));
         constructor.visitVarInsn(Opcodes.ALOAD, 0);
         constructor.visitVarInsn(Opcodes.ALOAD, 1);
         constructor.visitFieldInsn(Opcodes.PUTFIELD, classNode.name, PRIMITIVE_FIELD,



Mime
View raw message