8160891: javac, remove unused options, step 3

Reviewed-by: mcimadamore
This commit is contained in:
Vicente Romero 2016-07-06 09:42:27 -07:00
parent def98f36d4
commit 3360117337
7 changed files with 8 additions and 15 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 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
@ -106,9 +106,6 @@ public class LambdaToMethod extends TreeTranslator {
/** dump statistics about lambda code generation */
private boolean dumpLambdaToMethodStats;
/** force serializable representation, for stress testing **/
private final boolean forceSerializable;
/** Flag for alternate metafactories indicating the lambda object is intended to be serializable */
public static final int FLAG_SERIALIZABLE = 1 << 0;
@ -144,7 +141,6 @@ public class LambdaToMethod extends TreeTranslator {
Options options = Options.instance(context);
dumpLambdaToMethodStats = options.isSet("dumpLambdaToMethodStats");
attr = Attr.instance(context);
forceSerializable = options.isSet("forceSerializable");
}
// </editor-fold>
@ -1829,9 +1825,6 @@ public class LambdaToMethod extends TreeTranslator {
/** does this functional expression require serialization support? */
boolean isSerializable() {
if (forceSerializable) {
return true;
}
for (Type target : tree.targets) {
if (types.asSuper(target, syms.serializableType.tsym) != null) {
return true;

View file

@ -242,7 +242,7 @@ public class ClassReader {
allowSimplifiedVarargs = source.allowSimplifiedVarargs();
allowModules = source.allowModules();
saveParameterNames = options.isSet("save-parameter-names");
saveParameterNames = options.isSet(PARAMETERS);
profile = Profile.instance(context);

View file

@ -1108,7 +1108,7 @@ public class JavaCompiler {
processAnnotations = procEnvImpl.atLeastOneProcessor();
if (processAnnotations) {
options.put("save-parameter-names", "save-parameter-names");
options.put("parameters", "parameters");
reader.saveParameterNames = true;
keepComments = true;
genEndPos = true;

View file

@ -996,7 +996,7 @@ class SourceCodeAnalysisImpl extends SourceCodeAnalysis {
//tweaked by tests to disable reading parameter names from classfiles so that tests using
//JDK's classes are stable for both release and fastdebug builds:
private final String[] keepParameterNames = new String[] {
"-XDsave-parameter-names=true"
"-parameters"
};
private String documentationImpl(String code, int cursor) {

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 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
@ -116,7 +116,7 @@ public class MethodParametersTest {
void inspectBaz() throws Exception {
final File Qux_java =
writeFile(classesdir, Qux_name + ".java", Qux_contents);
final String[] args = { "-XDsave-parameter-names", "-d",
final String[] args = { "-parameters", "-d",
classesdir.getPath(),
"-cp", classesdir.getPath(),
Qux_java.getPath() };

View file

@ -26,7 +26,7 @@
* @bug 8047024
* @summary AssertionError: exception_index already contains a bytecode offset
* @compile T8047024_01.java
* @compile -XDsave-parameter-names=true T8047024.java
* @compile -parameters T8047024.java
*/
public class T8047024 {

View file

@ -50,7 +50,7 @@ public class T8136453 {
void run() {
JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
List<String> opts = Arrays.asList("-XDsave-parameter-names");
List<String> opts = Arrays.asList("-parameters");
JavacTask task = (JavacTask) compiler.getTask(null, null, null, opts, null, null);
TypeElement t = task.getElements().getTypeElement("T");
ExecutableElement testMethod = ElementFilter.methodsIn(t.getEnclosedElements()).get(0);