]> source.dussan.org Git - aspectj.git/commitdiff
might head down this route for stackmap
authoraclement <aclement>
Wed, 17 Sep 2008 17:00:11 +0000 (17:00 +0000)
committeraclement <aclement>
Wed, 17 Sep 2008 17:00:11 +0000 (17:00 +0000)
weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java

index 1f03069ae32d8923d6af80b761c7c344faf335ab..1c34c49c7e7337860d6d3d9f4b2fc6389e95bdf7 100644 (file)
@@ -65,6 +65,12 @@ import org.aspectj.weaver.WeaverStateInfo;
 import org.aspectj.weaver.World;
 import org.aspectj.weaver.AjAttribute.WeaverVersionInfo;
 import org.aspectj.weaver.UnresolvedType.TypeKind;
+import org.aspectj.weaver.bcel.asm.AsmDetector;
+import org.aspectj.weaver.bcel.asm.StackMapAdder;
+import org.objectweb.asm.ClassReader;
+import org.objectweb.asm.ClassWriter;
+
+import com.sun.org.apache.bcel.internal.classfile.StackMap;
 
 /**
  * Lazy lazy lazy. We don't unpack the underlying class unless necessary. Things like new methods and annotations accumulate in here
@@ -612,6 +618,11 @@ public final class LazyClassGen {
        public byte[] getJavaClassBytesIncludingReweavable(BcelWorld world) {
                writeBack(world);
                byte[] wovenClassFileData = myGen.getJavaClass().getBytes();
+               // if is java 6 class file
+//             if (myGen.getMajor()>=Constants.MAJOR_1_6 && AsmDetector.isAsmAround) {
+//                     wovenClassFileData = StackMapAdder.addStackMaps(wovenClassFileData);
+//             }
+               
                WeaverStateInfo wsi = myType.getWeaverState();// getOrCreateWeaverStateInfo();
                if (wsi != null && wsi.isReweavable()) { // && !reweavableDataInserted
                        // reweavableDataInserted = true;