src/share/classes/com/sun/tools/javac/jvm/ClassReader.java
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java Fri Jan 18 02:48:30 2013
--- new/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java Fri Jan 18 02:48:29 2013
*** 132,141 ****
--- 132,146 ----
* Switch: prefer source files instead of newer when both source
* and class are available
**/
public boolean preferSource;
+ /**
+ * The currently selected profile.
+ */
+ public final Profile profile;
+
/** The log to use for verbose output
*/
final Log log;
/** The symbol table. */
*** 282,301 ****
--- 287,310 ----
Options options = Options.instance(context);
annotate = Annotate.instance(context);
verbose = options.isSet(VERBOSE);
checkClassFile = options.isSet("-checkclassfile");
+
Source source = Source.instance(context);
allowGenerics = source.allowGenerics();
allowVarargs = source.allowVarargs();
allowAnnotations = source.allowAnnotations();
allowSimplifiedVarargs = source.allowSimplifiedVarargs();
allowDefaultMethods = source.allowDefaultMethods();
+
saveParameterNames = options.isSet("save-parameter-names");
cacheCompletionFailure = options.isUnset("dev");
preferSource = "source".equals(options.get("-Xprefer"));
+ profile = Profile.instance(context);
+
completionFailureName =
options.isSet("failcomplete")
? names.fromString(options.get("failcomplete"))
: null;
*** 1355,1365 ****
--- 1364,1385 ----
new ListBuffer<CompoundAnnotationProxy>();
for (int i = 0; i<numAttributes; i++) {
CompoundAnnotationProxy proxy = readCompoundAnnotation();
if (proxy.type.tsym == syms.proprietaryType.tsym)
sym.flags_field |= PROPRIETARY;
! else if (proxy.type.tsym == syms.profileType.tsym) {
+ if (profile != Profile.DEFAULT) {
+ for (Pair<Name,Attribute> v: proxy.values) {
+ if (v.fst == names.value && v.snd instanceof Attribute.Constant) {
+ Attribute.Constant c = (Attribute.Constant) v.snd;
+ if (c.type == syms.intType && ((Integer) c.value) > profile.value) {
+ sym.flags_field |= NOT_IN_PROFILE;
+ }
+ }
+ }
+ }
+ } else
proxies.append(proxy);
}
annotate.normal(new AnnotationCompleter(sym, proxies.toList()));
}
}
src/share/classes/com/sun/tools/javac/jvm/ClassReader.java
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File