]> source.dussan.org Git - aspectj.git/commitdiff
asm3.3.1/jarjar'd and activated auto stackmap creation for major version 51 classfile...
authoraclement <aclement>
Mon, 8 Aug 2011 20:21:33 +0000 (20:21 +0000)
committeraclement <aclement>
Mon, 8 Aug 2011 20:21:33 +0000 (20:21 +0000)
weaver/.classpath
weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java
weaver/src/org/aspectj/weaver/bcel/asm/AsmDetector.java
weaver/src/org/aspectj/weaver/bcel/asm/StackMapAdder.java

index 204cf1e269e72fec9a8f41c83c8ce07babdd7ec4..803dcce59697d82f2a6fcffccfb9db0d1a1998b4 100644 (file)
@@ -12,7 +12,7 @@
        <classpathentry kind="lib" path="/lib/commons/commons.jar" sourcepath="/lib/commons/commons-src.zip"/>
        <classpathentry kind="lib" path="/lib/bcel/bcel.jar" sourcepath="/lib/bcel/bcel-src.zip"/>
        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-       <classpathentry kind="lib" path="/lib/asm/asm-3.1.jar"/>
        <classpathentry combineaccessrules="false" kind="src" path="/org.aspectj.matcher"/>
+       <classpathentry kind="lib" path="/lib/asm/asm-3.3.1.renamed.jar"/>
        <classpathentry kind="output" path="bin"/>
 </classpath>
index fcebfc2a50f250b3371e61bcd9a617bd6c7e568a..53f585651a2eeb4e467b3df049372b18e1839da0 100644 (file)
@@ -678,12 +678,12 @@ public final class LazyClassGen {
                writeBack(world);
                byte[] wovenClassFileData = myGen.getJavaClass().getBytes();
                // if is java 6 class file
-               if (myGen.getMajor() >= Constants.MAJOR_1_6 && world.shouldGenerateStackMaps() && AsmDetector.isAsmAround) {
+               if (((myGen.getMajor() == Constants.MAJOR_1_6 && world.shouldGenerateStackMaps()) || myGen.getMajor() > Constants.MAJOR_1_6)
+                               && AsmDetector.isAsmAround) {
                        wovenClassFileData = StackMapAdder.addStackMaps(world, wovenClassFileData);
                }
 
-               WeaverStateInfo wsi = myType.getWeaverState();// getOrCreateWeaverStateInfo
-               // ();
+               WeaverStateInfo wsi = myType.getWeaverState();// getOrCreateWeaverStateInfo();
                if (wsi != null && wsi.isReweavable()) { // && !reweavableDataInserted
                        // reweavableDataInserted = true;
                        return wsi.replaceKeyWithDiff(wovenClassFileData);
index a2cc743554f7ee50cfd043ea71efc27d985bbe88..5d5bb6990c67a29acff54eb82fc37e2b55a0be4b 100644 (file)
@@ -24,8 +24,8 @@ public class AsmDetector {
 
        static {
                try {
-                       Class reader = Class.forName("org.objectweb.asm.ClassReader");
-                       Class visitor = Class.forName("org.objectweb.asm.ClassVisitor");
+                       Class<?> reader = Class.forName("aj.org.objectweb.asm.ClassReader");
+                       Class<?> visitor = Class.forName("aj.org.objectweb.asm.ClassVisitor");
                        Method m = reader.getMethod("accept", new Class[] { visitor, Integer.TYPE });
                        isAsmAround = m != null;
                } catch (Exception e) {
index 7bdc61dd9772422b5d7f50a19a9c89275e4d0855..87b0f6b952a8e9d2a42ce2a49d3faa8015336421 100644 (file)
@@ -14,8 +14,9 @@ package org.aspectj.weaver.bcel.asm;
 import org.aspectj.weaver.ResolvedType;
 import org.aspectj.weaver.UnresolvedType;
 import org.aspectj.weaver.World;
-import org.objectweb.asm.ClassReader;
-import org.objectweb.asm.ClassWriter;
+
+import aj.org.objectweb.asm.ClassReader;
+import aj.org.objectweb.asm.ClassWriter;
 
 /**
  * Uses asm to add the stack map attribute to methods in a class. The class is passed in as pure byte data and then a reader/writer