8308093: Disable language preview features use in JDK
Reviewed-by: liach, erikj, alanb, darcy
This commit is contained in:
parent
422128b70a
commit
c4408278d1
@ -110,7 +110,6 @@ JAVA_WARNINGS_ARE_ERRORS ?= -Werror
|
|||||||
JAVADOC_OPTIONS := -use -keywords -notimestamp \
|
JAVADOC_OPTIONS := -use -keywords -notimestamp \
|
||||||
-encoding ISO-8859-1 -docencoding UTF-8 -breakiterator \
|
-encoding ISO-8859-1 -docencoding UTF-8 -breakiterator \
|
||||||
-splitIndex --system none -javafx --expand-requires transitive \
|
-splitIndex --system none -javafx --expand-requires transitive \
|
||||||
--enable-preview -source $(JDK_SOURCE_TARGET_VERSION) \
|
|
||||||
--override-methods=summary \
|
--override-methods=summary \
|
||||||
--no-external-specs-page
|
--no-external-specs-page
|
||||||
|
|
||||||
@ -118,7 +117,6 @@ JAVADOC_OPTIONS := -use -keywords -notimestamp \
|
|||||||
# development cycle.
|
# development cycle.
|
||||||
REFERENCE_OPTIONS := -XDignore.symbol.file=true -use -keywords -notimestamp \
|
REFERENCE_OPTIONS := -XDignore.symbol.file=true -use -keywords -notimestamp \
|
||||||
-encoding ISO-8859-1 -breakiterator -splitIndex --system none \
|
-encoding ISO-8859-1 -breakiterator -splitIndex --system none \
|
||||||
--enable-preview -source $(JDK_SOURCE_TARGET_VERSION) \
|
|
||||||
-html5 -javafx --expand-requires transitive \
|
-html5 -javafx --expand-requires transitive \
|
||||||
--no-external-specs-page
|
--no-external-specs-page
|
||||||
|
|
||||||
|
@ -27,9 +27,7 @@ DISABLED_WARNINGS_java += this-escape
|
|||||||
|
|
||||||
DOCLINT += -Xdoclint:all/protected \
|
DOCLINT += -Xdoclint:all/protected \
|
||||||
'-Xdoclint/package:java.*,javax.*'
|
'-Xdoclint/package:java.*,javax.*'
|
||||||
JAVAC_FLAGS += -XDstringConcat=inline \
|
JAVAC_FLAGS += -XDstringConcat=inline
|
||||||
--enable-preview
|
|
||||||
DISABLED_WARNINGS_java += preview
|
|
||||||
COPY += .icu .dat .spp .nrm content-types.properties \
|
COPY += .icu .dat .spp .nrm content-types.properties \
|
||||||
hijrah-config-Hijrah-umalqura_islamic-umalqura.properties
|
hijrah-config-Hijrah-umalqura_islamic-umalqura.properties
|
||||||
CLEAN += intrinsic.properties
|
CLEAN += intrinsic.properties
|
||||||
|
@ -25,5 +25,3 @@
|
|||||||
|
|
||||||
DISABLED_WARNINGS_java += missing-explicit-ctor
|
DISABLED_WARNINGS_java += missing-explicit-ctor
|
||||||
JAVAC_FLAGS += -XDstringConcat=inline
|
JAVAC_FLAGS += -XDstringConcat=inline
|
||||||
JAVAC_FLAGS += --enable-preview
|
|
||||||
DISABLED_WARNINGS_java += preview
|
|
||||||
|
@ -150,7 +150,6 @@ module java.base {
|
|||||||
java.compiler,
|
java.compiler,
|
||||||
jdk.compiler,
|
jdk.compiler,
|
||||||
jdk.incubator.vector, // participates in preview features
|
jdk.incubator.vector, // participates in preview features
|
||||||
jdk.jartool, // participates in preview features
|
|
||||||
jdk.jshell;
|
jdk.jshell;
|
||||||
exports jdk.internal.access to
|
exports jdk.internal.access to
|
||||||
java.desktop,
|
java.desktop,
|
||||||
|
@ -106,8 +106,6 @@ public class ClassWriter extends ClassFile {
|
|||||||
/** Type utilities. */
|
/** Type utilities. */
|
||||||
private Types types;
|
private Types types;
|
||||||
|
|
||||||
private Symtab syms;
|
|
||||||
|
|
||||||
private Check check;
|
private Check check;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -174,7 +172,6 @@ public class ClassWriter extends ClassFile {
|
|||||||
target = Target.instance(context);
|
target = Target.instance(context);
|
||||||
source = Source.instance(context);
|
source = Source.instance(context);
|
||||||
types = Types.instance(context);
|
types = Types.instance(context);
|
||||||
syms = Symtab.instance(context);
|
|
||||||
check = Check.instance(context);
|
check = Check.instance(context);
|
||||||
fileManager = context.get(JavaFileManager.class);
|
fileManager = context.get(JavaFileManager.class);
|
||||||
poolWriter = Gen.instance(context).poolWriter;
|
poolWriter = Gen.instance(context).poolWriter;
|
||||||
@ -1676,9 +1673,7 @@ public class ClassWriter extends ClassFile {
|
|||||||
acount += writeExtraAttributes(c);
|
acount += writeExtraAttributes(c);
|
||||||
|
|
||||||
poolbuf.appendInt(JAVA_MAGIC);
|
poolbuf.appendInt(JAVA_MAGIC);
|
||||||
if (preview.isEnabled() && preview.usesPreview(c.sourcefile)
|
if (preview.isEnabled() && preview.usesPreview(c.sourcefile)) {
|
||||||
// do not write PREVIEW_MINOR_VERSION for classes participating in preview
|
|
||||||
&& !preview.participatesInPreview(syms, c, syms.java_base.unnamedPackage)) {
|
|
||||||
poolbuf.appendChar(ClassFile.PREVIEW_MINOR_VERSION);
|
poolbuf.appendChar(ClassFile.PREVIEW_MINOR_VERSION);
|
||||||
} else {
|
} else {
|
||||||
poolbuf.appendChar(target.minorVersion);
|
poolbuf.appendChar(target.minorVersion);
|
||||||
|
@ -23,8 +23,6 @@
|
|||||||
* questions.
|
* questions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import jdk.internal.javac.ParticipatesInPreview;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines tools for manipulating Java Archive (JAR) files,
|
* Defines tools for manipulating Java Archive (JAR) files,
|
||||||
* including the <em>{@index jar jar tool}</em> and
|
* including the <em>{@index jar jar tool}</em> and
|
||||||
@ -49,7 +47,6 @@ import jdk.internal.javac.ParticipatesInPreview;
|
|||||||
* @moduleGraph
|
* @moduleGraph
|
||||||
* @since 9
|
* @since 9
|
||||||
*/
|
*/
|
||||||
@ParticipatesInPreview
|
|
||||||
module jdk.jartool {
|
module jdk.jartool {
|
||||||
requires jdk.internal.opt;
|
requires jdk.internal.opt;
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
maxOutputSize = 2500000
|
maxOutputSize = 2500000
|
||||||
enablePreview = true
|
|
||||||
modules = \
|
modules = \
|
||||||
java.base/jdk.internal.classfile \
|
java.base/jdk.internal.classfile \
|
||||||
java.base/jdk.internal.classfile.attribute \
|
java.base/jdk.internal.classfile.attribute \
|
||||||
@ -8,6 +7,5 @@ modules = \
|
|||||||
java.base/jdk.internal.classfile.impl \
|
java.base/jdk.internal.classfile.impl \
|
||||||
java.base/jdk.internal.classfile.impl.verifier \
|
java.base/jdk.internal.classfile.impl.verifier \
|
||||||
java.base/jdk.internal.classfile.components \
|
java.base/jdk.internal.classfile.components \
|
||||||
java.base/jdk.internal.classfile.util \
|
|
||||||
java.base/jdk.internal.org.objectweb.asm \
|
java.base/jdk.internal.org.objectweb.asm \
|
||||||
java.base/jdk.internal.org.objectweb.asm.tree
|
java.base/jdk.internal.org.objectweb.asm.tree
|
@ -46,7 +46,6 @@ import org.openjdk.jmh.annotations.Warmup;
|
|||||||
@Warmup(iterations = 2)
|
@Warmup(iterations = 2)
|
||||||
@Measurement(iterations = 4)
|
@Measurement(iterations = 4)
|
||||||
@Fork(value = 1, jvmArgsAppend = {
|
@Fork(value = 1, jvmArgsAppend = {
|
||||||
"--enable-preview",
|
|
||||||
"--add-exports", "java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED",
|
"--add-exports", "java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED",
|
||||||
"--add-exports", "java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED",
|
"--add-exports", "java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED",
|
||||||
"--add-exports", "java.base/jdk.internal.classfile=ALL-UNNAMED",
|
"--add-exports", "java.base/jdk.internal.classfile=ALL-UNNAMED",
|
||||||
|
@ -56,7 +56,6 @@ import org.openjdk.jmh.annotations.Warmup;
|
|||||||
@BenchmarkMode(Mode.Throughput)
|
@BenchmarkMode(Mode.Throughput)
|
||||||
@State(Scope.Benchmark)
|
@State(Scope.Benchmark)
|
||||||
@Fork(value = 1, jvmArgsAppend = {
|
@Fork(value = 1, jvmArgsAppend = {
|
||||||
"--enable-preview",
|
|
||||||
"--add-exports", "java.base/jdk.internal.classfile=ALL-UNNAMED",
|
"--add-exports", "java.base/jdk.internal.classfile=ALL-UNNAMED",
|
||||||
"--add-exports", "java.base/jdk.internal.classfile.attribute=ALL-UNNAMED",
|
"--add-exports", "java.base/jdk.internal.classfile.attribute=ALL-UNNAMED",
|
||||||
"--add-exports", "java.base/jdk.internal.classfile.constantpool=ALL-UNNAMED",
|
"--add-exports", "java.base/jdk.internal.classfile.constantpool=ALL-UNNAMED",
|
||||||
|
@ -40,7 +40,6 @@ import org.openjdk.jmh.annotations.*;
|
|||||||
@BenchmarkMode(Mode.Throughput)
|
@BenchmarkMode(Mode.Throughput)
|
||||||
@State(Scope.Benchmark)
|
@State(Scope.Benchmark)
|
||||||
@Fork(value = 1, jvmArgsAppend = {
|
@Fork(value = 1, jvmArgsAppend = {
|
||||||
"--enable-preview",
|
|
||||||
"--add-exports", "java.base/jdk.internal.classfile=ALL-UNNAMED",
|
"--add-exports", "java.base/jdk.internal.classfile=ALL-UNNAMED",
|
||||||
"--add-exports", "java.base/jdk.internal.classfile.constantpool=ALL-UNNAMED",
|
"--add-exports", "java.base/jdk.internal.classfile.constantpool=ALL-UNNAMED",
|
||||||
"--add-exports", "java.base/jdk.internal.classfile.instruction=ALL-UNNAMED"})
|
"--add-exports", "java.base/jdk.internal.classfile.instruction=ALL-UNNAMED"})
|
||||||
|
@ -39,7 +39,6 @@ import org.openjdk.jmh.annotations.*;
|
|||||||
@BenchmarkMode(Mode.Throughput)
|
@BenchmarkMode(Mode.Throughput)
|
||||||
@State(Scope.Benchmark)
|
@State(Scope.Benchmark)
|
||||||
@Fork(value = 1, jvmArgsAppend = {
|
@Fork(value = 1, jvmArgsAppend = {
|
||||||
"--enable-preview",
|
|
||||||
"--add-exports", "java.base/jdk.internal.classfile=ALL-UNNAMED",
|
"--add-exports", "java.base/jdk.internal.classfile=ALL-UNNAMED",
|
||||||
"--add-exports", "java.base/jdk.internal.classfile.components=ALL-UNNAMED"})
|
"--add-exports", "java.base/jdk.internal.classfile.components=ALL-UNNAMED"})
|
||||||
@Warmup(iterations = 3)
|
@Warmup(iterations = 3)
|
||||||
|
@ -66,7 +66,6 @@ import static jdk.internal.org.objectweb.asm.Opcodes.V12;
|
|||||||
@Warmup(iterations = 3)
|
@Warmup(iterations = 3)
|
||||||
@Measurement(iterations = 5)
|
@Measurement(iterations = 5)
|
||||||
@Fork(value = 1, jvmArgsAppend = {
|
@Fork(value = 1, jvmArgsAppend = {
|
||||||
"--enable-preview",
|
|
||||||
"--add-exports", "java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED",
|
"--add-exports", "java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED",
|
||||||
"--add-exports", "java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED",
|
"--add-exports", "java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED",
|
||||||
"--add-exports", "java.base/jdk.internal.classfile=ALL-UNNAMED",
|
"--add-exports", "java.base/jdk.internal.classfile=ALL-UNNAMED",
|
||||||
|
Loading…
Reference in New Issue
Block a user