harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjanu...@apache.org
Subject svn commit: r727393 - /harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/ClassBands.java
Date Wed, 17 Dec 2008 14:30:42 GMT
Author: sjanuary
Date: Wed Dec 17 06:30:42 2008
New Revision: 727393

URL: http://svn.apache.org/viewvc?rev=727393&view=rev
Log:
Pack200 - Add support for deprecated attributes

Modified:
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/ClassBands.java

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/ClassBands.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/ClassBands.java?rev=727393&r1=727392&r2=727393&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/ClassBands.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/ClassBands.java
Wed Dec 17 06:30:42 2008
@@ -29,6 +29,7 @@
 import org.apache.harmony.pack200.IcBands.IcTuple;
 import org.objectweb.asm.Attribute;
 import org.objectweb.asm.Label;
+import org.objectweb.asm.Opcodes;
 
 public class ClassBands extends BandSet {
 
@@ -170,6 +171,10 @@
             cpBands.addCPUtf8("Synthetic");
             anySyntheticClasses = true;
         }
+        if((flags & Opcodes.ACC_DEPRECATED) != 0) { // ASM uses (1<<17) flag for
deprecated
+            flags = flags & ~Opcodes.ACC_DEPRECATED;
+            flags = flags | (1<<20);
+        }
         if(signature != null) {
             class_flags[index] |= (1 << 19);
             classSignature.add(cpBands.getCPSignature(signature));
@@ -209,6 +214,10 @@
             fieldSignature.add(cpBands.getCPSignature(signature));
             flags |= (1 << 19);
         }
+        if((flags & Opcodes.ACC_DEPRECATED) != 0) { // ASM uses (1<<17) flag for
deprecated
+            flags = flags & ~Opcodes.ACC_DEPRECATED;
+            flags = flags | (1<<20);
+        }
         if (value != null) {
             fieldConstantValueKQ.add(cpBands.getConstant(value));
             flags |= (1 << 17);
@@ -268,7 +277,6 @@
         // Compute any required IcLocals
         List innerClassesN = new ArrayList();
         List icLocal = new ArrayList();
-        Set keySet = classReferencesInnerClass.keySet();
         for (int i = 0; i < class_this.length; i++) {
             CPClass cpClass = class_this[i];
             Set referencedInnerClasses = (Set) classReferencesInnerClass.get(cpClass);
@@ -570,6 +578,10 @@
             }
             flags |= (1 << 18);
         }
+        if((flags & Opcodes.ACC_DEPRECATED) != 0) { // ASM uses (1<<17) flag for
deprecated
+            flags = flags & ~Opcodes.ACC_DEPRECATED;
+            flags = flags | (1<<20);
+        }
         tempMethodFlags.add(new Long(flags));
         numMethodArgs = countArgs(desc);
         if(!anySyntheticMethods && ((flags & (1 << 12)) != 0) &&
segment.getCurrentClassReader().hasSyntheticAttributes()) {



Mime
View raw message