# HG changeset patch # User vromero # Date 1456186645 28800 # Node ID ed5063b304beac73462f9783253bdb6ab768b6f8 # Parent 1c076468bf7dad5b8f2ee5dcf66e2279caa3e208 8149600: javac, remove unused options, step 2 Reviewed-by: jjg, mcimadamore diff -r 1c076468bf7d -r ed5063b304be langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java Wed Jul 05 21:22:47 2017 +0200 +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java Mon Feb 22 16:17:25 2016 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -155,8 +155,6 @@ allowDefaultMethods = source.allowDefaultMethods(); allowStaticInterfaceMethods = source.allowStaticInterfaceMethods(); sourceName = source.name; - relax = (options.isSet("-retrofit") || - options.isSet("-relax")); useBeforeDeclarationWarning = options.isSet("useBeforeDeclarationWarning"); statInfo = new ResultInfo(KindSelector.NIL, Type.noType); @@ -168,10 +166,6 @@ recoveryInfo = new RecoveryInfo(deferredAttr.emptyDeferredAttrContext); } - /** Switch: relax some constraints for retrofit mode. - */ - boolean relax; - /** Switch: support target-typing inference */ boolean allowPoly; @@ -1025,8 +1019,7 @@ log.error(tree.pos(), "default.allowed.in.intf.annotation.member"); } - if (isDefaultMethod || (tree.sym.flags() & (ABSTRACT | NATIVE)) == 0 && - !relax) + if (isDefaultMethod || (tree.sym.flags() & (ABSTRACT | NATIVE)) == 0) log.error(tree.pos(), "missing.meth.body.or.decl.abstract"); } else if ((tree.sym.flags() & (ABSTRACT|DEFAULT|PRIVATE)) == ABSTRACT) { if ((owner.flags() & INTERFACE) != 0) { @@ -4384,8 +4377,7 @@ // If this is a non-abstract class, check that it has no abstract // methods or unimplemented methods of an implemented interface. if ((c.flags() & (ABSTRACT | INTERFACE)) == 0) { - if (!relax) - chk.checkAllDefined(tree.pos(), c); + chk.checkAllDefined(tree.pos(), c); } if ((c.flags() & ANNOTATION) != 0) { diff -r 1c076468bf7d -r ed5063b304be langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java Wed Jul 05 21:22:47 2017 +0200 +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java Mon Feb 22 16:17:25 2016 -0800 @@ -81,8 +81,6 @@ private final Types types; private final TypeAnnotations typeAnnotations; private final JCDiagnostic.Factory diags; - private boolean warnOnSyntheticConflicts; - private boolean suppressAbortOnBadClassFile; private final JavaFileManager fileManager; private final Source source; private final Profile profile; @@ -130,8 +128,6 @@ allowStrictMethodClashCheck = source.allowStrictMethodClashCheck(); allowPrivateSafeVarargs = source.allowPrivateSafeVarargs(); allowDiamondWithAnonymousClassCreation = source.allowDiamondWithAnonymousClassCreation(); - warnOnSyntheticConflicts = options.isSet("warnOnSyntheticConflicts"); - suppressAbortOnBadClassFile = options.isSet("suppressAbortOnBadClassFile"); warnOnAccessToSensitiveMembers = options.isSet("warnOnAccessToSensitiveMembers"); Target target = Target.instance(context); @@ -269,8 +265,7 @@ */ public Type completionError(DiagnosticPosition pos, CompletionFailure ex) { log.error(JCDiagnostic.DiagnosticFlag.NON_DEFERRABLE, pos, "cant.access", ex.sym, ex.getDetailValue()); - if (ex instanceof ClassFinder.BadClassFile - && !suppressAbortOnBadClassFile) throw new Abort(); + if (ex instanceof ClassFinder.BadClassFile) throw new Abort(); else return syms.errType; } @@ -2632,12 +2627,7 @@ */ private void syntheticError(DiagnosticPosition pos, Symbol sym) { if (!sym.type.isErroneous()) { - if (warnOnSyntheticConflicts) { - log.warning(pos, "synthetic.name.conflict", sym, sym.location()); - } - else { - log.error(pos, "synthetic.name.conflict", sym, sym.location()); - } + log.error(pos, "synthetic.name.conflict", sym, sym.location()); } } diff -r 1c076468bf7d -r ed5063b304be langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassWriter.java --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassWriter.java Wed Jul 05 21:22:47 2017 +0200 +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassWriter.java Mon Feb 22 16:17:25 2016 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -72,18 +72,6 @@ */ private boolean verbose; - /** Switch: scramble private field names. - */ - private boolean scramble; - - /** Switch: scramble all field names. - */ - private boolean scrambleAll; - - /** Switch: retrofit mode. - */ - private boolean retrofit; - /** Switch: emit source file attribute. */ private boolean emitSourceFile; @@ -184,9 +172,6 @@ signatureGen = new CWSignatureGenerator(types); verbose = options.isSet(VERBOSE); - scramble = options.isSet("-scramble"); - scrambleAll = options.isSet("-scrambleAll"); - retrofit = options.isSet("-retrofit"); genCrt = options.isSet(XJCOV); debugstackmap = options.isSet("debugstackmap"); @@ -491,26 +476,11 @@ putChar(poolbuf, poolCountIdx, pool.pp); } - /** Given a field, return its name. - */ - Name fieldName(Symbol sym) { - if (scramble && (sym.flags() & PRIVATE) != 0 || - scrambleAll && (sym.flags() & (PROTECTED | PUBLIC)) == 0) - return names.fromString("_$" + sym.name.getIndex()); - else - return sym.name; - } - /** Given a symbol, return its name-and-type. */ NameAndType nameType(Symbol sym) { - return new NameAndType(fieldName(sym), - retrofit - ? sym.erasure(types) - : sym.externalType(types), types); - // if we retrofit, then the NameAndType has been read in as is - // and no change is necessary. If we compile normally, the - // NameAndType is generated from a symbol reference, and the + return new NameAndType(sym.name, sym.externalType(types), types); + // the NameAndType is generated from a symbol reference, and the // adjustment of adding an additional this$n parameter needs to be made. } @@ -1055,10 +1025,10 @@ databuf.appendChar(flags); if (dumpFieldModifiers) { PrintWriter pw = log.getWriter(Log.WriterKind.ERROR); - pw.println("FIELD " + fieldName(v)); + pw.println("FIELD " + v.name); pw.println("---" + flagNames(v.flags())); } - databuf.appendChar(pool.put(fieldName(v))); + databuf.appendChar(pool.put(v.name)); databuf.appendChar(pool.put(typeSig(v.erasure(types)))); int acountIdx = beginAttrs(); int acount = 0; @@ -1079,10 +1049,10 @@ databuf.appendChar(flags); if (dumpMethodModifiers) { PrintWriter pw = log.getWriter(Log.WriterKind.ERROR); - pw.println("METHOD " + fieldName(m)); + pw.println("METHOD " + m.name); pw.println("---" + flagNames(m.flags())); } - databuf.appendChar(pool.put(fieldName(m))); + databuf.appendChar(pool.put(m.name)); databuf.appendChar(pool.put(typeSig(m.externalType(types)))); int acountIdx = beginAttrs(); int acount = 0; diff -r 1c076468bf7d -r ed5063b304be langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java Wed Jul 05 21:22:47 2017 +0200 +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java Mon Feb 22 16:17:25 2016 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -120,25 +120,11 @@ : options.isSet(G_CUSTOM, "vars"); genCrt = options.isSet(XJCOV); debugCode = options.isSet("debugcode"); - allowInvokedynamic = target.hasInvokedynamic() || options.isSet("invokedynamic"); allowBetterNullChecks = target.hasObjects(); pool = new Pool(types); // ignore cldc because we cannot have both stackmap formats this.stackMap = StackMapFormat.JSR202; - - // by default, avoid jsr's for simple finalizers - int setjsrlimit = 50; - String jsrlimitString = options.get("jsrlimit"); - if (jsrlimitString != null) { - try { - setjsrlimit = Integer.parseInt(jsrlimitString); - } catch (NumberFormatException ex) { - // ignore ill-formed numbers for jsrlimit - } - } - this.jsrlimit = setjsrlimit; - this.useJsrLocally = false; // reset in visitTry annotate = Annotate.instance(context); } @@ -148,19 +134,8 @@ private final boolean varDebugInfo; private final boolean genCrt; private final boolean debugCode; - private final boolean allowInvokedynamic; private final boolean allowBetterNullChecks; - /** Default limit of (approximate) size of finalizer to inline. - * Zero means always use jsr. 100 or greater means never use - * jsr. - */ - private final int jsrlimit; - - /** True if jsr is used. - */ - private boolean useJsrLocally; - /** Code buffer, set by genMethod. */ private Code code; @@ -1339,31 +1314,11 @@ // in a new environment which calls the finally block if there is one. final Env tryEnv = env.dup(tree, new GenContext()); final Env oldEnv = env; - if (!useJsrLocally) { - useJsrLocally = - (stackMap == StackMapFormat.NONE) && - (jsrlimit <= 0 || - jsrlimit < 100 && - estimateCodeComplexity(tree.finalizer)>jsrlimit); - } tryEnv.info.finalize = new GenFinalizer() { void gen() { - if (useJsrLocally) { - if (tree.finalizer != null) { - Code.State jsrState = code.state.dup(); - jsrState.push(Code.jsrReturnValue); - tryEnv.info.cont = - new Chain(code.emitJump(jsr), - tryEnv.info.cont, - jsrState); - } - Assert.check(tryEnv.info.gaps.length() % 2 == 0); - tryEnv.info.gaps.append(code.curCP()); - } else { - Assert.check(tryEnv.info.gaps.length() % 2 == 0); - tryEnv.info.gaps.append(code.curCP()); - genLast(); - } + Assert.check(tryEnv.info.gaps.length() % 2 == 0); + tryEnv.info.gaps.append(code.curCP()); + genLast(); } void genLast() { if (tree.finalizer != null) @@ -1568,93 +1523,6 @@ } } - /** Very roughly estimate the number of instructions needed for - * the given tree. - */ - int estimateCodeComplexity(JCTree tree) { - if (tree == null) return 0; - class ComplexityScanner extends TreeScanner { - int complexity = 0; - public void scan(JCTree tree) { - if (complexity > jsrlimit) return; - super.scan(tree); - } - public void visitClassDef(JCClassDecl tree) {} - public void visitDoLoop(JCDoWhileLoop tree) - { super.visitDoLoop(tree); complexity++; } - public void visitWhileLoop(JCWhileLoop tree) - { super.visitWhileLoop(tree); complexity++; } - public void visitForLoop(JCForLoop tree) - { super.visitForLoop(tree); complexity++; } - public void visitSwitch(JCSwitch tree) - { super.visitSwitch(tree); complexity+=5; } - public void visitCase(JCCase tree) - { super.visitCase(tree); complexity++; } - public void visitSynchronized(JCSynchronized tree) - { super.visitSynchronized(tree); complexity+=6; } - public void visitTry(JCTry tree) - { super.visitTry(tree); - if (tree.finalizer != null) complexity+=6; } - public void visitCatch(JCCatch tree) - { super.visitCatch(tree); complexity+=2; } - public void visitConditional(JCConditional tree) - { super.visitConditional(tree); complexity+=2; } - public void visitIf(JCIf tree) - { super.visitIf(tree); complexity+=2; } - // note: for break, continue, and return we don't take unwind() into account. - public void visitBreak(JCBreak tree) - { super.visitBreak(tree); complexity+=1; } - public void visitContinue(JCContinue tree) - { super.visitContinue(tree); complexity+=1; } - public void visitReturn(JCReturn tree) - { super.visitReturn(tree); complexity+=1; } - public void visitThrow(JCThrow tree) - { super.visitThrow(tree); complexity+=1; } - public void visitAssert(JCAssert tree) - { super.visitAssert(tree); complexity+=5; } - public void visitApply(JCMethodInvocation tree) - { super.visitApply(tree); complexity+=2; } - public void visitNewClass(JCNewClass tree) - { scan(tree.encl); scan(tree.args); complexity+=2; } - public void visitNewArray(JCNewArray tree) - { super.visitNewArray(tree); complexity+=5; } - public void visitAssign(JCAssign tree) - { super.visitAssign(tree); complexity+=1; } - public void visitAssignop(JCAssignOp tree) - { super.visitAssignop(tree); complexity+=2; } - public void visitUnary(JCUnary tree) - { complexity+=1; - if (tree.type.constValue() == null) super.visitUnary(tree); } - public void visitBinary(JCBinary tree) - { complexity+=1; - if (tree.type.constValue() == null) super.visitBinary(tree); } - public void visitTypeTest(JCInstanceOf tree) - { super.visitTypeTest(tree); complexity+=1; } - public void visitIndexed(JCArrayAccess tree) - { super.visitIndexed(tree); complexity+=1; } - public void visitSelect(JCFieldAccess tree) - { super.visitSelect(tree); - if (tree.sym.kind == VAR) complexity+=1; } - public void visitIdent(JCIdent tree) { - if (tree.sym.kind == VAR) { - complexity+=1; - if (tree.type.constValue() == null && - tree.sym.owner.kind == TYP) - complexity+=1; - } - } - public void visitLiteral(JCLiteral tree) - { complexity+=1; } - public void visitTree(JCTree tree) {} - public void visitWildcard(JCWildcard tree) { - throw new AssertionError(this.getClass().getName()); - } - } - ComplexityScanner scanner = new ComplexityScanner(); - tree.accept(scanner); - return scanner.complexity; - } - public void visitIf(JCIf tree) { int limit = code.nextreg; Chain thenExit = null; diff -r 1c076468bf7d -r ed5063b304be langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java Wed Jul 05 21:22:47 2017 +0200 +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java Mon Feb 22 16:17:25 2016 -0800 @@ -389,9 +389,6 @@ verbose = options.isSet(VERBOSE); sourceOutput = options.isSet(PRINTSOURCE); // used to be -s - stubOutput = options.isSet("-stubs"); - relax = options.isSet("-relax"); - printFlat = options.isSet("-printflat"); encoding = options.get(ENCODING); lineDebugInfo = options.isUnset(G_CUSTOM) || options.isSet(G_CUSTOM, "lines"); @@ -447,18 +444,6 @@ */ public boolean sourceOutput; - /** Emit stub source files rather than class files. - */ - public boolean stubOutput; - - /** Switch: relax some constraints for producing the jsr14 prototype. - */ - boolean relax; - - /** Debug switch: Emit Java sources after inner class flattening. - */ - public boolean printFlat; - /** The encoding to be used for source input. */ public String encoding; @@ -611,7 +596,7 @@ // where public boolean keepComments = false; protected boolean keepComments() { - return keepComments || sourceOutput || stubOutput; + return keepComments || sourceOutput; } @@ -676,30 +661,6 @@ } } - /** Emit plain Java source for a class. - * @param env The attribution environment of the outermost class - * containing this class. - * @param cdef The class definition to be printed. - */ - JavaFileObject printSource(Env env, JCClassDecl cdef) throws IOException { - JavaFileObject outFile - = fileManager.getJavaFileForOutput(CLASS_OUTPUT, - cdef.sym.flatname.toString(), - JavaFileObject.Kind.SOURCE, - null); - if (inputFiles.contains(outFile)) { - log.error(cdef.pos(), "source.cant.overwrite.input.file", outFile); - return null; - } else { - try (BufferedWriter out = new BufferedWriter(outFile.openWriter())) { - new Pretty(out, true).printUnit(env.toplevel, cdef); - if (verbose) - log.printVerbose("wrote.file", outFile); - } - return outFile; - } - } - /** Generate code and emit a class file for a given class * @param env The attribution environment of the outermost class * containing this class. @@ -720,6 +681,30 @@ return null; } + /** Emit plain Java source for a class. + * @param env The attribution environment of the outermost class + * containing this class. + * @param cdef The class definition to be printed. + */ + JavaFileObject printSource(Env env, JCClassDecl cdef) throws IOException { + JavaFileObject outFile + = fileManager.getJavaFileForOutput(CLASS_OUTPUT, + cdef.sym.flatname.toString(), + JavaFileObject.Kind.SOURCE, + null); + if (inputFiles.contains(outFile)) { + log.error(cdef.pos(), "source.cant.overwrite.input.file", outFile); + return null; + } else { + try (BufferedWriter out = new BufferedWriter(outFile.openWriter())) { + new Pretty(out, true).printUnit(env.toplevel, cdef); + if (verbose) + log.printVerbose("wrote.file", outFile); + } + return outFile; + } + } + /** Compile a source file that has been accessed by the class finder. * @param c The class the source file of which needs to be compiled. */ @@ -898,12 +883,6 @@ } /** - * Set needRootClasses to true, in JavaCompiler subclass constructor - * that want to collect public apis of classes supplied on the command line. - */ - protected boolean needRootClasses = false; - - /** * The list of classes explicitly supplied on the command line for compilation. * Not always populated. */ @@ -966,7 +945,7 @@ // If generating source, or if tracking public apis, // then remember the classes declared in // the original compilation units listed on the command line. - if (needRootClasses || sourceOutput || stubOutput) { + if (sourceOutput) { ListBuffer cdefs = new ListBuffer<>(); for (JCCompilationUnit unit : roots) { for (List defs = unit.defs; @@ -1275,11 +1254,6 @@ if (shouldStop(CompileState.FLOW)) return; - if (relax) { - results.add(env); - return; - } - if (verboseCompilePolicy) printNote("[flow " + env.enclClass.sym + "]"); JavaFileObject prev = log.useSource( @@ -1419,9 +1393,9 @@ TreeMaker localMake = make.forToplevel(env.toplevel); if (env.tree.hasTag(JCTree.Tag.PACKAGEDEF)) { - if (!(stubOutput || sourceOutput || printFlat)) { + if (!(sourceOutput)) { if (shouldStop(CompileState.LOWER)) - return; + return; List pdef = lower.translateTopLevelClass(env, env.tree, localMake); if (pdef.head != null) { Assert.check(pdef.tail.isEmpty()); @@ -1431,19 +1405,6 @@ return; } - if (stubOutput) { - //emit stub Java source file, only for compilation - //units enumerated explicitly on the command line - JCClassDecl cdef = (JCClassDecl)env.tree; - if (untranslated instanceof JCClassDecl && - rootClasses.contains((JCClassDecl)untranslated) && - ((cdef.mods.flags & (Flags.PROTECTED|Flags.PUBLIC)) != 0 || - cdef.sym.packge().getQualifiedName() == names.java_lang)) { - results.add(new Pair<>(env, removeMethodBodies(cdef))); - } - return; - } - if (shouldStop(CompileState.TRANSTYPES)) return; @@ -1504,16 +1465,12 @@ if (shouldStop(CompileState.GENERATE)) return; - boolean usePrintSource = (stubOutput || sourceOutput || printFlat); - for (Pair, JCClassDecl> x: queue) { Env env = x.fst; JCClassDecl cdef = x.snd; if (verboseCompilePolicy) { - printNote("[generate " - + (usePrintSource ? " source" : "code") - + " " + cdef.sym + "]"); + printNote("[generate " + (sourceOutput ? " source" : "code") + " " + cdef.sym + "]"); } if (!taskListener.isEmpty()) { @@ -1526,9 +1483,9 @@ env.toplevel.sourcefile); try { JavaFileObject file; - if (usePrintSource) + if (sourceOutput) { file = printSource(env, cdef); - else { + } else { if (fileManager.hasLocation(StandardLocation.NATIVE_HEADER_OUTPUT) && jniWriter.needsHeader(cdef.sym)) { jniWriter.write(cdef.sym); diff -r 1c076468bf7d -r ed5063b304be langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Option.java --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Option.java Wed Jul 05 21:22:47 2017 +0200 +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Option.java Mon Feb 22 16:17:25 2016 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff -r 1c076468bf7d -r ed5063b304be langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties Wed Jul 05 21:22:47 2017 +0200 +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties Mon Feb 22 16:17:25 2016 -0800 @@ -981,10 +981,6 @@ compiler.err.synthetic.name.conflict=\ the symbol {0} conflicts with a compiler-synthesized symbol in {1} -# 0: symbol, 1: symbol -compiler.warn.synthetic.name.conflict=\ - the symbol {0} conflicts with a compiler-synthesized symbol in {1} - compiler.err.throws.not.allowed.in.intf.annotation=\ throws clause not allowed in @interface members @@ -1334,16 +1330,6 @@ compiler.misc.verbose.wrote.file=\ [wrote {0}] -## extra output when using -verbose (Retro) -compiler.misc.verbose.retro=\ - [retrofitting {0}] - -compiler.misc.verbose.retro.with=\ - \tretrofitting {0} with {1} - -compiler.misc.verbose.retro.with.list=\ - \tretrofitting {0} with type parameters {1}, supertype {2}, interfaces {3} - ## extra output when using -verbose (code/ClassReader) # 0: string compiler.misc.verbose.loading=\ diff -r 1c076468bf7d -r ed5063b304be langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties Wed Jul 05 21:22:47 2017 +0200 +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties Mon Feb 22 16:17:25 2016 -0800 @@ -124,20 +124,12 @@ Don't accept generics in the language javac.opt.moreinfo=\ Print extended information for type variables -javac.opt.printflat=\ - Print abstract syntax tree after inner class conversion javac.opt.printsearch=\ Print information where classfiles are searched javac.opt.prompt=\ Stop after each error -javac.opt.retrofit=\ - Retrofit existing classfiles with generic types javac.opt.s=\ Emit java sources instead of classfiles -javac.opt.scramble=\ - Scramble private identifiers in bytecode -javac.opt.scrambleall=\ - Scramble package visible identifiers in bytecode javac.opt.version=\ Version information javac.opt.arg.pathname=\ diff -r 1c076468bf7d -r ed5063b304be langtools/src/jdk.compiler/share/classes/com/sun/tools/javah/JavahTask.java --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javah/JavahTask.java Wed Jul 05 21:22:47 2017 +0200 +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javah/JavahTask.java Mon Feb 22 16:17:25 2016 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -170,12 +170,6 @@ } }, - new HiddenOption(false, "-stubs") { - void process(JavahTask task, String opt, String arg) { - // ignored; for backwards compatibility - } - }, - new Option(false, "-v", "-verbose") { void process(JavahTask task, String opt, String arg) { task.verbose = true; @@ -454,8 +448,6 @@ if (llni) g = new LLNI(doubleAlign, util); else { -// if (stubs) -// throw new BadArgs("jni.no.stubs"); g = new JNI(util); } diff -r 1c076468bf7d -r ed5063b304be langtools/test/tools/javac/6257443/T6257443.java --- a/langtools/test/tools/javac/6257443/T6257443.java Wed Jul 05 21:22:47 2017 +0200 +++ b/langtools/test/tools/javac/6257443/T6257443.java Mon Feb 22 16:17:25 2016 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,13 +31,7 @@ * * @clean foo.package-info * - * @compile -XD-printflat package-info.java - * @run main/othervm T6257443 -no foo/package-info.class - * - * @compile -XD-stubs package-info.java - * @run main/othervm T6257443 -no foo/package-info.class - * - * @compile -XD-printsource package-info.java + * @compile -printsource package-info.java * @run main/othervm T6257443 -no foo/package-info.class */ diff -r 1c076468bf7d -r ed5063b304be langtools/test/tools/javac/6521805/T6521805a.java --- a/langtools/test/tools/javac/6521805/T6521805a.java Wed Jul 05 21:22:47 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6521805 - * @summary Regression: JDK5/JDK6 javac allows write access to outer class reference - * @author mcimadamore - * - * @compile/fail/ref=T6521805a_1.out T6521805a.java -XDrawDiagnostics - * @compile/ref=T6521805a_2.out T6521805a.java -XDwarnOnSyntheticConflicts -XDrawDiagnostics - */ - -class T6521805a { - - static class Outer { - T6521805a this$0 = null; - } - - public class Inner extends Outer { - public void foo() { - this$0 = new T6521805a(); - } - } -} diff -r 1c076468bf7d -r ed5063b304be langtools/test/tools/javac/6521805/T6521805a_1.out --- a/langtools/test/tools/javac/6521805/T6521805a_1.out Wed Jul 05 21:22:47 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -T6521805a.java:17:12: compiler.err.synthetic.name.conflict: this$0, T6521805a.Outer -1 error diff -r 1c076468bf7d -r ed5063b304be langtools/test/tools/javac/6521805/T6521805a_2.out --- a/langtools/test/tools/javac/6521805/T6521805a_2.out Wed Jul 05 21:22:47 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -T6521805a.java:17:12: compiler.warn.synthetic.name.conflict: this$0, T6521805a.Outer -1 warning diff -r 1c076468bf7d -r ed5063b304be langtools/test/tools/javac/api/taskListeners/EventsBalancedTest.java --- a/langtools/test/tools/javac/api/taskListeners/EventsBalancedTest.java Wed Jul 05 21:22:47 2017 +0200 +++ b/langtools/test/tools/javac/api/taskListeners/EventsBalancedTest.java Mon Feb 22 16:17:25 2016 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -61,8 +61,6 @@ test(null, Arrays.asList(a, b)); test(null, Arrays.asList(b, a)); - test(Arrays.asList("-XD-relax"), Arrays.asList(a, b)); - test(Arrays.asList("-XD-relax"), Arrays.asList(b, a)); for (CompileState stop : CompileState.values()) { test(Arrays.asList("-XDshouldStopPolicyIfNoError=" + stop, diff -r 1c076468bf7d -r ed5063b304be langtools/test/tools/javac/diags/CheckResourceKeys.java --- a/langtools/test/tools/javac/diags/CheckResourceKeys.java Wed Jul 05 21:22:47 2017 +0200 +++ b/langtools/test/tools/javac/diags/CheckResourceKeys.java Mon Feb 22 16:17:25 2016 -0800 @@ -231,22 +231,15 @@ "compiler.err.type.var.more.than.once.in.result", // UNUSED "compiler.misc.non.denotable.type", // UNUSED "compiler.misc.unnamed.package", // should be required, CR 6964147 - "compiler.misc.verbose.retro", // UNUSED - "compiler.misc.verbose.retro.with", // UNUSED - "compiler.misc.verbose.retro.with.list", // UNUSED "compiler.warn.proc.type.already.exists", // TODO in JavacFiler "javac.err.invalid.arg", // UNUSED ?? "javac.opt.arg.class", // UNUSED ?? "javac.opt.arg.pathname", // UNUSED ?? "javac.opt.moreinfo", // option commented out "javac.opt.nogj", // UNUSED - "javac.opt.printflat", // option commented out "javac.opt.printsearch", // option commented out "javac.opt.prompt", // option commented out - "javac.opt.retrofit", // UNUSED - "javac.opt.s", // option commented out - "javac.opt.scramble", // option commented out - "javac.opt.scrambleall" // option commented out + "javac.opt.s" // option commented out )); /** diff -r 1c076468bf7d -r ed5063b304be langtools/test/tools/javac/diags/examples.not-yet.txt --- a/langtools/test/tools/javac/diags/examples.not-yet.txt Wed Jul 05 21:22:47 2017 +0200 +++ b/langtools/test/tools/javac/diags/examples.not-yet.txt Mon Feb 22 16:17:25 2016 -0800 @@ -86,9 +86,6 @@ compiler.misc.undecl.type.var # ClassReader compiler.misc.unicode.str.not.supported # ClassReader compiler.misc.malformed.vararg.method # ClassReader -compiler.misc.verbose.retro # UNUSED -compiler.misc.verbose.retro.with # UNUSED -compiler.misc.verbose.retro.with.list # UNUSED compiler.misc.version.not.available # JavaCompiler; implies build error compiler.misc.where.description.captured compiler.misc.where.typevar.1 diff -r 1c076468bf7d -r ed5063b304be langtools/test/tools/javac/diags/examples/WarnSyntheticNameConflict.java --- a/langtools/test/tools/javac/diags/examples/WarnSyntheticNameConflict.java Wed Jul 05 21:22:47 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -// key: compiler.warn.synthetic.name.conflict -// options: -XDwarnOnSyntheticConflicts - -class WarnSyntheticNameConflict { - - static class Outer { - WarnSyntheticNameConflict this$0 = null; - } - - public class Inner extends Outer { } -}