< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/code/Flags.java

Print this page
@@ -96,19 +96,23 @@
      public static final int ENUM         = 1<<14;
  
      /** Added in SE8, represents constructs implicitly declared in source. */
      public static final int MANDATED     = 1<<15;
  
+     /** Marks a type as a primitive class */
+     public static final int PRIMITIVE_CLASS  = 1<<16;
+ 
      public static final int StandardFlags = 0x0fff;
  
      // Because the following access flags are overloaded with other
      // bit positions, we translate them when reading and writing class
      // files into unique bits positions: ACC_SYNTHETIC <-> SYNTHETIC,
      // for example.
      public static final int ACC_SUPER    = 0x0020;
      public static final int ACC_BRIDGE   = 0x0040;
      public static final int ACC_VARARGS  = 0x0080;
+     public static final int ACC_PRIMITIVE = 0x0100;
      public static final int ACC_MODULE   = 0x8000;
  
      /*****************************************
       * Internal compiler flags (no bits in the lower 16).
       *****************************************/

@@ -120,10 +124,28 @@
      /** Flag is set for a variable symbol if the variable's definition
       *  has an initializer part.
       */
      public static final int HASINIT          = 1<<18;
  
+     /** Flag is set for a class symbol if it defines one or more non-empty
+      *  instance initializer block(s). This is relevenat only for class symbols
+      *  that originate from source types. For binary types the instance initializer
+      *  blocks are "normalized" into the constructors.
+      */
+     public static final int HASINITBLOCK         = 1<<18;
+ 
+     /** Flag is set for a method symbol if it is an empty no-arg ctor.
+      *  i.e one that simply returns (jlO) or merely chains to a super's
+      *  EMPTYNOARGCONSTR
+      */
+     public static final int EMPTYNOARGCONSTR         = 1<<18;
+ 
+     /**
+      * Flag is set for a reference favoring primitive class.
+      */
+     public static final int REFERENCE_FAVORING          = 1<<19;
+ 
      /** Flag is set for compiler-generated anonymous method symbols
       *  that `own' an initializer block.
       */
      public static final int BLOCK            = 1<<20;
  

@@ -388,16 +410,21 @@
      /**
       * Flag to indicate that the class/interface was declared with the non-sealed modifier.
       */
      public static final long NON_SEALED = 1L<<63; // ClassSymbols
  
+     // Encodings for extended flags stored using attributes
+     /**
+      * Flag to indicate that the primitive class is reference default.
+      */
+     public static final int ACC_REF_DEFAULT = 1;
  
      /** Modifier masks.
       */
      public static final int
          AccessFlags                       = PUBLIC | PROTECTED | PRIVATE,
-         LocalClassFlags                   = FINAL | ABSTRACT | STRICTFP | ENUM | SYNTHETIC,
+         LocalClassFlags                   = FINAL | ABSTRACT | STRICTFP | ENUM | SYNTHETIC  | PRIMITIVE_CLASS,
          StaticLocalFlags                  = LocalClassFlags | STATIC | INTERFACE,
          MemberClassFlags                  = LocalClassFlags | INTERFACE | AccessFlags,
          MemberStaticClassFlags            = MemberClassFlags | STATIC,
          ClassFlags                        = LocalClassFlags | INTERFACE | PUBLIC | ANNOTATION,
          InterfaceVarFlags                 = FINAL | STATIC | PUBLIC,

@@ -408,11 +435,11 @@
          MethodFlags                       = AccessFlags | ABSTRACT | STATIC | NATIVE |
                                              SYNCHRONIZED | FINAL | STRICTFP,
          RecordMethodFlags                 = AccessFlags | ABSTRACT | STATIC |
                                              SYNCHRONIZED | FINAL | STRICTFP;
      public static final long
-         ExtendedStandardFlags             = (long)StandardFlags | DEFAULT | SEALED | NON_SEALED,
+         ExtendedStandardFlags             = (long)StandardFlags | DEFAULT | SEALED | NON_SEALED | PRIMITIVE_CLASS,
          ExtendedMemberClassFlags          = (long)MemberClassFlags | SEALED | NON_SEALED,
          ExtendedMemberStaticClassFlags    = (long) MemberStaticClassFlags | SEALED | NON_SEALED,
          ExtendedClassFlags                = (long)ClassFlags | SEALED | NON_SEALED,
          ModifierFlags                     = ((long)StandardFlags & ~INTERFACE) | DEFAULT | SEALED | NON_SEALED,
          InterfaceMethodMask               = ABSTRACT | PRIVATE | STATIC | PUBLIC | STRICTFP | DEFAULT,

@@ -438,10 +465,11 @@
              if (0 != (flags & SYNCHRONIZED))
                                            modifiers.add(Modifier.SYNCHRONIZED);
              if (0 != (flags & NATIVE))    modifiers.add(Modifier.NATIVE);
              if (0 != (flags & STRICTFP))  modifiers.add(Modifier.STRICTFP);
              if (0 != (flags & DEFAULT))   modifiers.add(Modifier.DEFAULT);
+             if (0 != (flags & PRIMITIVE_CLASS))     modifiers.add(Modifier.PRIMITIVE);
              modifiers = Collections.unmodifiableSet(modifiers);
              modifierSets.put(flags, modifiers);
          }
          return modifiers;
      }

@@ -479,13 +507,17 @@
          BRIDGE(Flags.BRIDGE),
          SYNTHETIC(Flags.SYNTHETIC),
          ANNOTATION(Flags.ANNOTATION),
          DEPRECATED(Flags.DEPRECATED),
          HASINIT(Flags.HASINIT),
+         HASINITBLOCK(Flags.HASINITBLOCK),
+         EMPTYNOARGCONSTR(Flags.EMPTYNOARGCONSTR),
+         REFERENCE_FAVORING(Flags.REFERENCE_FAVORING),
          BLOCK(Flags.BLOCK),
          ENUM(Flags.ENUM),
          MANDATED(Flags.MANDATED),
+         PRIMITIVE(Flags.PRIMITIVE_CLASS),
          NOOUTERTHIS(Flags.NOOUTERTHIS),
          EXISTS(Flags.EXISTS),
          COMPOUND(Flags.COMPOUND),
          CLASS_SEEN(Flags.CLASS_SEEN),
          SOURCE_SEEN(Flags.SOURCE_SEEN),
< prev index next >