Merge
This commit is contained in:
commit
af66b48e12
@ -366,3 +366,4 @@ e882bcdbdac436523f3d5681611d3118a3804ea7 jdk-9+117
|
|||||||
cae471d3b87783e0a3deea658e1e1c84b2485b6c jdk-9+121
|
cae471d3b87783e0a3deea658e1e1c84b2485b6c jdk-9+121
|
||||||
346be2df0f5b31d423807f53a719d1b9a67f3354 jdk-9+122
|
346be2df0f5b31d423807f53a719d1b9a67f3354 jdk-9+122
|
||||||
405d811c0d7b9b48ff718ae6c240b732f098c028 jdk-9+123
|
405d811c0d7b9b48ff718ae6c240b732f098c028 jdk-9+123
|
||||||
|
f80c841ae2545eaf9acd2724bccc305d98cefbe2 jdk-9+124
|
||||||
|
@ -5094,7 +5094,7 @@ VS_SDK_PLATFORM_NAME_2013=
|
|||||||
#CUSTOM_AUTOCONF_INCLUDE
|
#CUSTOM_AUTOCONF_INCLUDE
|
||||||
|
|
||||||
# Do not change or remove the following line, it is needed for consistency checks:
|
# Do not change or remove the following line, it is needed for consistency checks:
|
||||||
DATE_WHEN_GENERATED=1466007828
|
DATE_WHEN_GENERATED=1467039751
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
@ -36621,7 +36621,6 @@ $as_echo "yes" >&6; }
|
|||||||
# Setup the assembler (AS)
|
# Setup the assembler (AS)
|
||||||
#
|
#
|
||||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||||
# FIXME: should this really be solaris, or solstudio?
|
|
||||||
|
|
||||||
|
|
||||||
# Publish this variable in the help.
|
# Publish this variable in the help.
|
||||||
@ -37105,6 +37104,9 @@ $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "x$AS" = x; then
|
||||||
|
as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
# FIXME: is this correct for microsoft?
|
# FIXME: is this correct for microsoft?
|
||||||
AS="$CC -c"
|
AS="$CC -c"
|
||||||
|
@ -597,9 +597,11 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
|
|||||||
# Setup the assembler (AS)
|
# Setup the assembler (AS)
|
||||||
#
|
#
|
||||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||||
# FIXME: should this really be solaris, or solstudio?
|
|
||||||
BASIC_PATH_PROGS(AS, as)
|
BASIC_PATH_PROGS(AS, as)
|
||||||
BASIC_FIXUP_EXECUTABLE(AS)
|
BASIC_FIXUP_EXECUTABLE(AS)
|
||||||
|
if test "x$AS" = x; then
|
||||||
|
AC_MSG_ERROR([Solaris assembler (as) is required. Please install via "pkg install pkg:/developer/assembler".])
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
# FIXME: is this correct for microsoft?
|
# FIXME: is this correct for microsoft?
|
||||||
AS="$CC -c"
|
AS="$CC -c"
|
||||||
|
@ -360,9 +360,11 @@ compare_general_files() {
|
|||||||
$RM $OTHER_FILE $THIS_FILE
|
$RM $OTHER_FILE $THIS_FILE
|
||||||
#Note that | doesn't work on mac sed.
|
#Note that | doesn't work on mac sed.
|
||||||
HTML_FILTER="$SED \
|
HTML_FILTER="$SED \
|
||||||
-e 's/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}-[0-9]\{6\}/<DATE>/g' \
|
-e 's/20[0-9]\{2\}-[0-9]\{2\}-[0-9]\{2\}-[0-9]\{6\}/<DATE>/g' \
|
||||||
|
-e 's/20[0-9]\{2\}-[0-9]\{2\}-[0-9]\{2\}/<DATE>/g' \
|
||||||
-e 's/\(-- Generated by javadoc \).*\( --\)/\1(removed)\2/' \
|
-e 's/\(-- Generated by javadoc \).*\( --\)/\1(removed)\2/' \
|
||||||
-e 's/[A-Z][a-z]*, [A-Z][a-z]* [0-9][0-9]*, [0-9]\{4\} [0-9][0-9:]* [AMP]\{2,2\} [A-Z][A-Z]*/<DATE>/'
|
-e 's/[A-Z][a-z]*, [A-Z][a-z]* [0-9][0-9]*, [0-9]\{4\} [0-9][0-9:]* [AMP]\{2,2\} [A-Z][A-Z]*/<DATE>/' \
|
||||||
|
-e 's/from .*\.idl/\.idl/' \
|
||||||
"
|
"
|
||||||
$CAT $OTHER_DIR/$f | eval "$HTML_FILTER" > $OTHER_FILE &
|
$CAT $OTHER_DIR/$f | eval "$HTML_FILTER" > $OTHER_FILE &
|
||||||
$CAT $THIS_DIR/$f | eval "$HTML_FILTER" > $THIS_FILE &
|
$CAT $THIS_DIR/$f | eval "$HTML_FILTER" > $THIS_FILE &
|
||||||
|
@ -526,3 +526,4 @@ b64432bae5271735fd53300b2005b713e98ef411 jdk-9+114
|
|||||||
7e293105dbb0789a468655f81320c891f491f371 jdk-9+121
|
7e293105dbb0789a468655f81320c891f491f371 jdk-9+121
|
||||||
af6b4ad908e732d23021f12e8322b204433d5cf6 jdk-9+122
|
af6b4ad908e732d23021f12e8322b204433d5cf6 jdk-9+122
|
||||||
75f81e1fecfb444f34f357295fe06af60e2762d9 jdk-9+123
|
75f81e1fecfb444f34f357295fe06af60e2762d9 jdk-9+123
|
||||||
|
479631362b4930be985245ea063d87d821a472eb jdk-9+124
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
product, \
|
product, \
|
||||||
product_pd, \
|
product_pd, \
|
||||||
diagnostic, \
|
diagnostic, \
|
||||||
|
diagnostic_pd, \
|
||||||
notproduct, \
|
notproduct, \
|
||||||
range, \
|
range, \
|
||||||
constraint, \
|
constraint, \
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
product, \
|
product, \
|
||||||
product_pd, \
|
product_pd, \
|
||||||
diagnostic, \
|
diagnostic, \
|
||||||
|
diagnostic_pd, \
|
||||||
notproduct, \
|
notproduct, \
|
||||||
range, \
|
range, \
|
||||||
constraint, \
|
constraint, \
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
product, \
|
product, \
|
||||||
product_pd, \
|
product_pd, \
|
||||||
diagnostic, \
|
diagnostic, \
|
||||||
|
diagnostic_pd, \
|
||||||
notproduct, \
|
notproduct, \
|
||||||
range, \
|
range, \
|
||||||
constraint, \
|
constraint, \
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
product, \
|
product, \
|
||||||
product_pd, \
|
product_pd, \
|
||||||
diagnostic, \
|
diagnostic, \
|
||||||
|
diagnostic_pd, \
|
||||||
notproduct, \
|
notproduct, \
|
||||||
range, \
|
range, \
|
||||||
constraint, \
|
constraint, \
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
product, \
|
product, \
|
||||||
product_pd, \
|
product_pd, \
|
||||||
diagnostic, \
|
diagnostic, \
|
||||||
|
diagnostic_pd, \
|
||||||
notproduct, \
|
notproduct, \
|
||||||
range, \
|
range, \
|
||||||
constraint, \
|
constraint, \
|
||||||
|
@ -30,6 +30,7 @@ C1_FLAGS(MATERIALIZE_DEVELOPER_FLAG, \
|
|||||||
MATERIALIZE_PRODUCT_FLAG, \
|
MATERIALIZE_PRODUCT_FLAG, \
|
||||||
MATERIALIZE_PD_PRODUCT_FLAG, \
|
MATERIALIZE_PD_PRODUCT_FLAG, \
|
||||||
MATERIALIZE_DIAGNOSTIC_FLAG, \
|
MATERIALIZE_DIAGNOSTIC_FLAG, \
|
||||||
|
MATERIALIZE_PD_DIAGNOSTIC_FLAG, \
|
||||||
MATERIALIZE_NOTPRODUCT_FLAG, \
|
MATERIALIZE_NOTPRODUCT_FLAG, \
|
||||||
IGNORE_RANGE, \
|
IGNORE_RANGE, \
|
||||||
IGNORE_CONSTRAINT, \
|
IGNORE_CONSTRAINT, \
|
||||||
|
@ -65,6 +65,7 @@
|
|||||||
product, \
|
product, \
|
||||||
product_pd, \
|
product_pd, \
|
||||||
diagnostic, \
|
diagnostic, \
|
||||||
|
diagnostic_pd, \
|
||||||
notproduct, \
|
notproduct, \
|
||||||
range, \
|
range, \
|
||||||
constraint, \
|
constraint, \
|
||||||
@ -356,6 +357,7 @@ C1_FLAGS(DECLARE_DEVELOPER_FLAG, \
|
|||||||
DECLARE_PRODUCT_FLAG, \
|
DECLARE_PRODUCT_FLAG, \
|
||||||
DECLARE_PD_PRODUCT_FLAG, \
|
DECLARE_PD_PRODUCT_FLAG, \
|
||||||
DECLARE_DIAGNOSTIC_FLAG, \
|
DECLARE_DIAGNOSTIC_FLAG, \
|
||||||
|
DECLARE_PD_DIAGNOSTIC_FLAG, \
|
||||||
DECLARE_NOTPRODUCT_FLAG, \
|
DECLARE_NOTPRODUCT_FLAG, \
|
||||||
IGNORE_RANGE, \
|
IGNORE_RANGE, \
|
||||||
IGNORE_CONSTRAINT, \
|
IGNORE_CONSTRAINT, \
|
||||||
|
@ -30,6 +30,7 @@ G1_FLAGS(MATERIALIZE_DEVELOPER_FLAG, \
|
|||||||
MATERIALIZE_PRODUCT_FLAG, \
|
MATERIALIZE_PRODUCT_FLAG, \
|
||||||
MATERIALIZE_PD_PRODUCT_FLAG, \
|
MATERIALIZE_PD_PRODUCT_FLAG, \
|
||||||
MATERIALIZE_DIAGNOSTIC_FLAG, \
|
MATERIALIZE_DIAGNOSTIC_FLAG, \
|
||||||
|
MATERIALIZE_PD_DIAGNOSTIC_FLAG, \
|
||||||
MATERIALIZE_EXPERIMENTAL_FLAG, \
|
MATERIALIZE_EXPERIMENTAL_FLAG, \
|
||||||
MATERIALIZE_NOTPRODUCT_FLAG, \
|
MATERIALIZE_NOTPRODUCT_FLAG, \
|
||||||
MATERIALIZE_MANAGEABLE_FLAG, \
|
MATERIALIZE_MANAGEABLE_FLAG, \
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
product, \
|
product, \
|
||||||
product_pd, \
|
product_pd, \
|
||||||
diagnostic, \
|
diagnostic, \
|
||||||
|
diagnostic_pd, \
|
||||||
experimental, \
|
experimental, \
|
||||||
notproduct, \
|
notproduct, \
|
||||||
manageable, \
|
manageable, \
|
||||||
@ -323,6 +324,7 @@ G1_FLAGS(DECLARE_DEVELOPER_FLAG, \
|
|||||||
DECLARE_PRODUCT_FLAG, \
|
DECLARE_PRODUCT_FLAG, \
|
||||||
DECLARE_PD_PRODUCT_FLAG, \
|
DECLARE_PD_PRODUCT_FLAG, \
|
||||||
DECLARE_DIAGNOSTIC_FLAG, \
|
DECLARE_DIAGNOSTIC_FLAG, \
|
||||||
|
DECLARE_PD_DIAGNOSTIC_FLAG, \
|
||||||
DECLARE_EXPERIMENTAL_FLAG, \
|
DECLARE_EXPERIMENTAL_FLAG, \
|
||||||
DECLARE_NOTPRODUCT_FLAG, \
|
DECLARE_NOTPRODUCT_FLAG, \
|
||||||
DECLARE_MANAGEABLE_FLAG, \
|
DECLARE_MANAGEABLE_FLAG, \
|
||||||
|
@ -32,6 +32,7 @@ JVMCI_FLAGS(MATERIALIZE_DEVELOPER_FLAG, \
|
|||||||
MATERIALIZE_PRODUCT_FLAG, \
|
MATERIALIZE_PRODUCT_FLAG, \
|
||||||
MATERIALIZE_PD_PRODUCT_FLAG, \
|
MATERIALIZE_PD_PRODUCT_FLAG, \
|
||||||
MATERIALIZE_DIAGNOSTIC_FLAG, \
|
MATERIALIZE_DIAGNOSTIC_FLAG, \
|
||||||
|
MATERIALIZE_PD_DIAGNOSTIC_FLAG, \
|
||||||
MATERIALIZE_EXPERIMENTAL_FLAG, \
|
MATERIALIZE_EXPERIMENTAL_FLAG, \
|
||||||
MATERIALIZE_NOTPRODUCT_FLAG,
|
MATERIALIZE_NOTPRODUCT_FLAG,
|
||||||
IGNORE_RANGE, \
|
IGNORE_RANGE, \
|
||||||
@ -89,6 +90,7 @@ bool JVMCIGlobals::check_jvmci_flags_are_consistent() {
|
|||||||
JVMCI_IGNORE_FLAG_FOUR_PARAM, \
|
JVMCI_IGNORE_FLAG_FOUR_PARAM, \
|
||||||
JVMCI_IGNORE_FLAG_THREE_PARAM, \
|
JVMCI_IGNORE_FLAG_THREE_PARAM, \
|
||||||
JVMCI_DIAGNOSTIC_FLAG_VALUE_CHANGED_CHECK_CODE, \
|
JVMCI_DIAGNOSTIC_FLAG_VALUE_CHANGED_CHECK_CODE, \
|
||||||
|
JVMCI_IGNORE_FLAG_THREE_PARAM, \
|
||||||
JVMCI_IGNORE_FLAG_FOUR_PARAM, \
|
JVMCI_IGNORE_FLAG_FOUR_PARAM, \
|
||||||
JVMCI_IGNORE_FLAG_FOUR_PARAM, \
|
JVMCI_IGNORE_FLAG_FOUR_PARAM, \
|
||||||
IGNORE_RANGE, \
|
IGNORE_RANGE, \
|
||||||
@ -104,6 +106,7 @@ bool JVMCIGlobals::check_jvmci_flags_are_consistent() {
|
|||||||
JVMCI_IGNORE_FLAG_FOUR_PARAM, \
|
JVMCI_IGNORE_FLAG_FOUR_PARAM, \
|
||||||
JVMCI_IGNORE_FLAG_THREE_PARAM, \
|
JVMCI_IGNORE_FLAG_THREE_PARAM, \
|
||||||
JVMCI_IGNORE_FLAG_FOUR_PARAM, \
|
JVMCI_IGNORE_FLAG_FOUR_PARAM, \
|
||||||
|
JVMCI_IGNORE_FLAG_THREE_PARAM, \
|
||||||
JVMCI_EXPERIMENTAL_FLAG_VALUE_CHANGED_CHECK_CODE, \
|
JVMCI_EXPERIMENTAL_FLAG_VALUE_CHANGED_CHECK_CODE, \
|
||||||
JVMCI_IGNORE_FLAG_FOUR_PARAM, \
|
JVMCI_IGNORE_FLAG_FOUR_PARAM, \
|
||||||
IGNORE_RANGE, \
|
IGNORE_RANGE, \
|
||||||
@ -129,6 +132,7 @@ bool JVMCIGlobals::check_jvmci_flags_are_consistent() {
|
|||||||
JVMCI_PRODUCT_FLAG_VALUE_CHANGED_CHECK_CODE, \
|
JVMCI_PRODUCT_FLAG_VALUE_CHANGED_CHECK_CODE, \
|
||||||
JVMCI_PD_PRODUCT_FLAG_VALUE_CHANGED_CHECK_CODE, \
|
JVMCI_PD_PRODUCT_FLAG_VALUE_CHANGED_CHECK_CODE, \
|
||||||
JVMCI_IGNORE_FLAG_FOUR_PARAM, \
|
JVMCI_IGNORE_FLAG_FOUR_PARAM, \
|
||||||
|
JVMCI_IGNORE_FLAG_THREE_PARAM, \
|
||||||
JVMCI_IGNORE_FLAG_FOUR_PARAM, \
|
JVMCI_IGNORE_FLAG_FOUR_PARAM, \
|
||||||
JVMCI_NOTPRODUCT_FLAG_VALUE_CHANGED_CHECK_CODE, \
|
JVMCI_NOTPRODUCT_FLAG_VALUE_CHANGED_CHECK_CODE, \
|
||||||
IGNORE_RANGE, \
|
IGNORE_RANGE, \
|
||||||
@ -168,6 +172,7 @@ void JVMCIGlobals::print_jvmci_args_inconsistency_error_message() {
|
|||||||
JVMCI_IGNORE_FLAG_FOUR_PARAM, \
|
JVMCI_IGNORE_FLAG_FOUR_PARAM, \
|
||||||
JVMCI_IGNORE_FLAG_THREE_PARAM, \
|
JVMCI_IGNORE_FLAG_THREE_PARAM, \
|
||||||
JVMCI_DIAGNOSTIC_FLAG_CHECK_PRINT_ERR_MSG_CODE, \
|
JVMCI_DIAGNOSTIC_FLAG_CHECK_PRINT_ERR_MSG_CODE, \
|
||||||
|
JVMCI_IGNORE_FLAG_THREE_PARAM, \
|
||||||
JVMCI_IGNORE_FLAG_FOUR_PARAM, \
|
JVMCI_IGNORE_FLAG_FOUR_PARAM, \
|
||||||
JVMCI_IGNORE_FLAG_FOUR_PARAM, \
|
JVMCI_IGNORE_FLAG_FOUR_PARAM, \
|
||||||
IGNORE_RANGE, \
|
IGNORE_RANGE, \
|
||||||
@ -181,6 +186,7 @@ void JVMCIGlobals::print_jvmci_args_inconsistency_error_message() {
|
|||||||
JVMCI_IGNORE_FLAG_FOUR_PARAM, \
|
JVMCI_IGNORE_FLAG_FOUR_PARAM, \
|
||||||
JVMCI_IGNORE_FLAG_THREE_PARAM, \
|
JVMCI_IGNORE_FLAG_THREE_PARAM, \
|
||||||
JVMCI_IGNORE_FLAG_FOUR_PARAM, \
|
JVMCI_IGNORE_FLAG_FOUR_PARAM, \
|
||||||
|
JVMCI_IGNORE_FLAG_THREE_PARAM, \
|
||||||
JVMCI_EXPERIMENTAL_FLAG_CHECK_PRINT_ERR_MSG_CODE, \
|
JVMCI_EXPERIMENTAL_FLAG_CHECK_PRINT_ERR_MSG_CODE, \
|
||||||
JVMCI_IGNORE_FLAG_FOUR_PARAM, \
|
JVMCI_IGNORE_FLAG_FOUR_PARAM, \
|
||||||
IGNORE_RANGE, \
|
IGNORE_RANGE, \
|
||||||
@ -206,6 +212,7 @@ void JVMCIGlobals::print_jvmci_args_inconsistency_error_message() {
|
|||||||
JVMCI_PRODUCT_FLAG_CHECK_PRINT_ERR_MSG_CODE, \
|
JVMCI_PRODUCT_FLAG_CHECK_PRINT_ERR_MSG_CODE, \
|
||||||
JVMCI_PD_PRODUCT_FLAG_CHECK_PRINT_ERR_MSG_CODE, \
|
JVMCI_PD_PRODUCT_FLAG_CHECK_PRINT_ERR_MSG_CODE, \
|
||||||
JVMCI_IGNORE_FLAG_FOUR_PARAM, \
|
JVMCI_IGNORE_FLAG_FOUR_PARAM, \
|
||||||
|
JVMCI_IGNORE_FLAG_THREE_PARAM, \
|
||||||
JVMCI_IGNORE_FLAG_FOUR_PARAM, \
|
JVMCI_IGNORE_FLAG_FOUR_PARAM, \
|
||||||
JVMCI_NOTPRODUCT_FLAG_CHECK_PRINT_ERR_MSG_CODE, \
|
JVMCI_NOTPRODUCT_FLAG_CHECK_PRINT_ERR_MSG_CODE, \
|
||||||
IGNORE_RANGE, \
|
IGNORE_RANGE, \
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
product, \
|
product, \
|
||||||
product_pd, \
|
product_pd, \
|
||||||
diagnostic, \
|
diagnostic, \
|
||||||
|
diagnostic_pd, \
|
||||||
experimental, \
|
experimental, \
|
||||||
notproduct, \
|
notproduct, \
|
||||||
range, \
|
range, \
|
||||||
@ -102,6 +103,7 @@ JVMCI_FLAGS(DECLARE_DEVELOPER_FLAG, \
|
|||||||
DECLARE_PRODUCT_FLAG, \
|
DECLARE_PRODUCT_FLAG, \
|
||||||
DECLARE_PD_PRODUCT_FLAG, \
|
DECLARE_PD_PRODUCT_FLAG, \
|
||||||
DECLARE_DIAGNOSTIC_FLAG, \
|
DECLARE_DIAGNOSTIC_FLAG, \
|
||||||
|
DECLARE_PD_DIAGNOSTIC_FLAG, \
|
||||||
DECLARE_EXPERIMENTAL_FLAG, \
|
DECLARE_EXPERIMENTAL_FLAG, \
|
||||||
DECLARE_NOTPRODUCT_FLAG, \
|
DECLARE_NOTPRODUCT_FLAG, \
|
||||||
IGNORE_RANGE, \
|
IGNORE_RANGE, \
|
||||||
|
@ -30,6 +30,7 @@ C2_FLAGS(MATERIALIZE_DEVELOPER_FLAG, \
|
|||||||
MATERIALIZE_PRODUCT_FLAG, \
|
MATERIALIZE_PRODUCT_FLAG, \
|
||||||
MATERIALIZE_PD_PRODUCT_FLAG, \
|
MATERIALIZE_PD_PRODUCT_FLAG, \
|
||||||
MATERIALIZE_DIAGNOSTIC_FLAG, \
|
MATERIALIZE_DIAGNOSTIC_FLAG, \
|
||||||
|
MATERIALIZE_PD_DIAGNOSTIC_FLAG, \
|
||||||
MATERIALIZE_EXPERIMENTAL_FLAG, \
|
MATERIALIZE_EXPERIMENTAL_FLAG, \
|
||||||
MATERIALIZE_NOTPRODUCT_FLAG, \
|
MATERIALIZE_NOTPRODUCT_FLAG, \
|
||||||
IGNORE_RANGE, \
|
IGNORE_RANGE, \
|
||||||
|
@ -66,6 +66,7 @@
|
|||||||
product, \
|
product, \
|
||||||
product_pd, \
|
product_pd, \
|
||||||
diagnostic, \
|
diagnostic, \
|
||||||
|
diagnostic_pd, \
|
||||||
experimental, \
|
experimental, \
|
||||||
notproduct, \
|
notproduct, \
|
||||||
range, \
|
range, \
|
||||||
@ -203,7 +204,7 @@
|
|||||||
"Map number of unrolls for main loop via " \
|
"Map number of unrolls for main loop via " \
|
||||||
"Superword Level Parallelism analysis") \
|
"Superword Level Parallelism analysis") \
|
||||||
\
|
\
|
||||||
product_pd(bool, PostLoopMultiversioning, \
|
diagnostic_pd(bool, PostLoopMultiversioning, \
|
||||||
"Multi versioned post loops to eliminate range checks") \
|
"Multi versioned post loops to eliminate range checks") \
|
||||||
\
|
\
|
||||||
notproduct(bool, TraceSuperWordLoopUnrollAnalysis, false, \
|
notproduct(bool, TraceSuperWordLoopUnrollAnalysis, false, \
|
||||||
@ -764,6 +765,7 @@ C2_FLAGS(DECLARE_DEVELOPER_FLAG, \
|
|||||||
DECLARE_PRODUCT_FLAG, \
|
DECLARE_PRODUCT_FLAG, \
|
||||||
DECLARE_PD_PRODUCT_FLAG, \
|
DECLARE_PD_PRODUCT_FLAG, \
|
||||||
DECLARE_DIAGNOSTIC_FLAG, \
|
DECLARE_DIAGNOSTIC_FLAG, \
|
||||||
|
DECLARE_PD_DIAGNOSTIC_FLAG, \
|
||||||
DECLARE_EXPERIMENTAL_FLAG, \
|
DECLARE_EXPERIMENTAL_FLAG, \
|
||||||
DECLARE_NOTPRODUCT_FLAG, \
|
DECLARE_NOTPRODUCT_FLAG, \
|
||||||
IGNORE_RANGE, \
|
IGNORE_RANGE, \
|
||||||
|
@ -211,6 +211,7 @@ void emit_constraint_double(const char* name, CommandLineFlagConstraintFunc_doub
|
|||||||
#define EMIT_CONSTRAINT_MANAGEABLE_FLAG(type, name, value, doc) ); emit_constraint_##type(#name
|
#define EMIT_CONSTRAINT_MANAGEABLE_FLAG(type, name, value, doc) ); emit_constraint_##type(#name
|
||||||
#define EMIT_CONSTRAINT_PRODUCT_RW_FLAG(type, name, value, doc) ); emit_constraint_##type(#name
|
#define EMIT_CONSTRAINT_PRODUCT_RW_FLAG(type, name, value, doc) ); emit_constraint_##type(#name
|
||||||
#define EMIT_CONSTRAINT_PD_PRODUCT_FLAG(type, name, doc) ); emit_constraint_##type(#name
|
#define EMIT_CONSTRAINT_PD_PRODUCT_FLAG(type, name, doc) ); emit_constraint_##type(#name
|
||||||
|
#define EMIT_CONSTRAINT_PD_DIAGNOSTIC_FLAG(type, name, doc) ); emit_constraint_##type(#name
|
||||||
#define EMIT_CONSTRAINT_DEVELOPER_FLAG(type, name, value, doc) ); emit_constraint_##type(#name
|
#define EMIT_CONSTRAINT_DEVELOPER_FLAG(type, name, value, doc) ); emit_constraint_##type(#name
|
||||||
#define EMIT_CONSTRAINT_PD_DEVELOPER_FLAG(type, name, doc) ); emit_constraint_##type(#name
|
#define EMIT_CONSTRAINT_PD_DEVELOPER_FLAG(type, name, doc) ); emit_constraint_##type(#name
|
||||||
#define EMIT_CONSTRAINT_NOTPRODUCT_FLAG(type, name, value, doc) ); emit_constraint_##type(#name
|
#define EMIT_CONSTRAINT_NOTPRODUCT_FLAG(type, name, value, doc) ); emit_constraint_##type(#name
|
||||||
@ -233,6 +234,7 @@ void CommandLineFlagConstraintList::init(void) {
|
|||||||
EMIT_CONSTRAINT_PRODUCT_FLAG,
|
EMIT_CONSTRAINT_PRODUCT_FLAG,
|
||||||
EMIT_CONSTRAINT_PD_PRODUCT_FLAG,
|
EMIT_CONSTRAINT_PD_PRODUCT_FLAG,
|
||||||
EMIT_CONSTRAINT_DIAGNOSTIC_FLAG,
|
EMIT_CONSTRAINT_DIAGNOSTIC_FLAG,
|
||||||
|
EMIT_CONSTRAINT_PD_DIAGNOSTIC_FLAG,
|
||||||
EMIT_CONSTRAINT_EXPERIMENTAL_FLAG,
|
EMIT_CONSTRAINT_EXPERIMENTAL_FLAG,
|
||||||
EMIT_CONSTRAINT_NOTPRODUCT_FLAG,
|
EMIT_CONSTRAINT_NOTPRODUCT_FLAG,
|
||||||
EMIT_CONSTRAINT_MANAGEABLE_FLAG,
|
EMIT_CONSTRAINT_MANAGEABLE_FLAG,
|
||||||
@ -260,6 +262,7 @@ void CommandLineFlagConstraintList::init(void) {
|
|||||||
EMIT_CONSTRAINT_PRODUCT_FLAG,
|
EMIT_CONSTRAINT_PRODUCT_FLAG,
|
||||||
EMIT_CONSTRAINT_PD_PRODUCT_FLAG,
|
EMIT_CONSTRAINT_PD_PRODUCT_FLAG,
|
||||||
EMIT_CONSTRAINT_DIAGNOSTIC_FLAG,
|
EMIT_CONSTRAINT_DIAGNOSTIC_FLAG,
|
||||||
|
EMIT_CONSTRAINT_PD_DIAGNOSTIC_FLAG,
|
||||||
EMIT_CONSTRAINT_NOTPRODUCT_FLAG,
|
EMIT_CONSTRAINT_NOTPRODUCT_FLAG,
|
||||||
IGNORE_RANGE,
|
IGNORE_RANGE,
|
||||||
EMIT_CONSTRAINT_CHECK,
|
EMIT_CONSTRAINT_CHECK,
|
||||||
@ -272,6 +275,7 @@ void CommandLineFlagConstraintList::init(void) {
|
|||||||
EMIT_CONSTRAINT_PRODUCT_FLAG,
|
EMIT_CONSTRAINT_PRODUCT_FLAG,
|
||||||
EMIT_CONSTRAINT_PD_PRODUCT_FLAG,
|
EMIT_CONSTRAINT_PD_PRODUCT_FLAG,
|
||||||
EMIT_CONSTRAINT_DIAGNOSTIC_FLAG,
|
EMIT_CONSTRAINT_DIAGNOSTIC_FLAG,
|
||||||
|
EMIT_CONSTRAINT_PD_DIAGNOSTIC_FLAG,
|
||||||
EMIT_CONSTRAINT_EXPERIMENTAL_FLAG,
|
EMIT_CONSTRAINT_EXPERIMENTAL_FLAG,
|
||||||
EMIT_CONSTRAINT_NOTPRODUCT_FLAG,
|
EMIT_CONSTRAINT_NOTPRODUCT_FLAG,
|
||||||
IGNORE_RANGE,
|
IGNORE_RANGE,
|
||||||
@ -285,6 +289,7 @@ void CommandLineFlagConstraintList::init(void) {
|
|||||||
EMIT_CONSTRAINT_PRODUCT_FLAG,
|
EMIT_CONSTRAINT_PRODUCT_FLAG,
|
||||||
EMIT_CONSTRAINT_PD_PRODUCT_FLAG,
|
EMIT_CONSTRAINT_PD_PRODUCT_FLAG,
|
||||||
EMIT_CONSTRAINT_DIAGNOSTIC_FLAG,
|
EMIT_CONSTRAINT_DIAGNOSTIC_FLAG,
|
||||||
|
EMIT_CONSTRAINT_PD_DIAGNOSTIC_FLAG,
|
||||||
EMIT_CONSTRAINT_EXPERIMENTAL_FLAG,
|
EMIT_CONSTRAINT_EXPERIMENTAL_FLAG,
|
||||||
EMIT_CONSTRAINT_NOTPRODUCT_FLAG,
|
EMIT_CONSTRAINT_NOTPRODUCT_FLAG,
|
||||||
EMIT_CONSTRAINT_MANAGEABLE_FLAG,
|
EMIT_CONSTRAINT_MANAGEABLE_FLAG,
|
||||||
|
@ -278,6 +278,7 @@ void emit_range_double(const char* name, double min, double max) {
|
|||||||
#define EMIT_RANGE_MANAGEABLE_FLAG(type, name, value, doc) ); emit_range_##type(#name
|
#define EMIT_RANGE_MANAGEABLE_FLAG(type, name, value, doc) ); emit_range_##type(#name
|
||||||
#define EMIT_RANGE_PRODUCT_RW_FLAG(type, name, value, doc) ); emit_range_##type(#name
|
#define EMIT_RANGE_PRODUCT_RW_FLAG(type, name, value, doc) ); emit_range_##type(#name
|
||||||
#define EMIT_RANGE_PD_PRODUCT_FLAG(type, name, doc) ); emit_range_##type(#name
|
#define EMIT_RANGE_PD_PRODUCT_FLAG(type, name, doc) ); emit_range_##type(#name
|
||||||
|
#define EMIT_RANGE_PD_DIAGNOSTIC_FLAG(type, name, doc) ); emit_range_##type(#name
|
||||||
#define EMIT_RANGE_DEVELOPER_FLAG(type, name, value, doc) ); emit_range_##type(#name
|
#define EMIT_RANGE_DEVELOPER_FLAG(type, name, value, doc) ); emit_range_##type(#name
|
||||||
#define EMIT_RANGE_PD_DEVELOPER_FLAG(type, name, doc) ); emit_range_##type(#name
|
#define EMIT_RANGE_PD_DEVELOPER_FLAG(type, name, doc) ); emit_range_##type(#name
|
||||||
#define EMIT_RANGE_NOTPRODUCT_FLAG(type, name, value, doc) ); emit_range_##type(#name
|
#define EMIT_RANGE_NOTPRODUCT_FLAG(type, name, value, doc) ); emit_range_##type(#name
|
||||||
@ -299,6 +300,7 @@ void CommandLineFlagRangeList::init(void) {
|
|||||||
EMIT_RANGE_PRODUCT_FLAG,
|
EMIT_RANGE_PRODUCT_FLAG,
|
||||||
EMIT_RANGE_PD_PRODUCT_FLAG,
|
EMIT_RANGE_PD_PRODUCT_FLAG,
|
||||||
EMIT_RANGE_DIAGNOSTIC_FLAG,
|
EMIT_RANGE_DIAGNOSTIC_FLAG,
|
||||||
|
EMIT_RANGE_PD_DIAGNOSTIC_FLAG,
|
||||||
EMIT_RANGE_EXPERIMENTAL_FLAG,
|
EMIT_RANGE_EXPERIMENTAL_FLAG,
|
||||||
EMIT_RANGE_NOTPRODUCT_FLAG,
|
EMIT_RANGE_NOTPRODUCT_FLAG,
|
||||||
EMIT_RANGE_MANAGEABLE_FLAG,
|
EMIT_RANGE_MANAGEABLE_FLAG,
|
||||||
@ -325,6 +327,7 @@ void CommandLineFlagRangeList::init(void) {
|
|||||||
EMIT_RANGE_PRODUCT_FLAG,
|
EMIT_RANGE_PRODUCT_FLAG,
|
||||||
EMIT_RANGE_PD_PRODUCT_FLAG,
|
EMIT_RANGE_PD_PRODUCT_FLAG,
|
||||||
EMIT_RANGE_DIAGNOSTIC_FLAG,
|
EMIT_RANGE_DIAGNOSTIC_FLAG,
|
||||||
|
EMIT_RANGE_PD_DIAGNOSTIC_FLAG,
|
||||||
EMIT_RANGE_EXPERIMENTAL_FLAG,
|
EMIT_RANGE_EXPERIMENTAL_FLAG,
|
||||||
EMIT_RANGE_NOTPRODUCT_FLAG,
|
EMIT_RANGE_NOTPRODUCT_FLAG,
|
||||||
EMIT_RANGE_CHECK,
|
EMIT_RANGE_CHECK,
|
||||||
@ -338,6 +341,7 @@ void CommandLineFlagRangeList::init(void) {
|
|||||||
EMIT_RANGE_PRODUCT_FLAG,
|
EMIT_RANGE_PRODUCT_FLAG,
|
||||||
EMIT_RANGE_PD_PRODUCT_FLAG,
|
EMIT_RANGE_PD_PRODUCT_FLAG,
|
||||||
EMIT_RANGE_DIAGNOSTIC_FLAG,
|
EMIT_RANGE_DIAGNOSTIC_FLAG,
|
||||||
|
EMIT_RANGE_PD_DIAGNOSTIC_FLAG,
|
||||||
EMIT_RANGE_NOTPRODUCT_FLAG,
|
EMIT_RANGE_NOTPRODUCT_FLAG,
|
||||||
EMIT_RANGE_CHECK,
|
EMIT_RANGE_CHECK,
|
||||||
IGNORE_CONSTRAINT,
|
IGNORE_CONSTRAINT,
|
||||||
@ -350,6 +354,7 @@ void CommandLineFlagRangeList::init(void) {
|
|||||||
EMIT_RANGE_PRODUCT_FLAG,
|
EMIT_RANGE_PRODUCT_FLAG,
|
||||||
EMIT_RANGE_PD_PRODUCT_FLAG,
|
EMIT_RANGE_PD_PRODUCT_FLAG,
|
||||||
EMIT_RANGE_DIAGNOSTIC_FLAG,
|
EMIT_RANGE_DIAGNOSTIC_FLAG,
|
||||||
|
EMIT_RANGE_PD_DIAGNOSTIC_FLAG,
|
||||||
EMIT_RANGE_EXPERIMENTAL_FLAG,
|
EMIT_RANGE_EXPERIMENTAL_FLAG,
|
||||||
EMIT_RANGE_NOTPRODUCT_FLAG,
|
EMIT_RANGE_NOTPRODUCT_FLAG,
|
||||||
EMIT_RANGE_CHECK,
|
EMIT_RANGE_CHECK,
|
||||||
@ -363,6 +368,7 @@ void CommandLineFlagRangeList::init(void) {
|
|||||||
EMIT_RANGE_PRODUCT_FLAG,
|
EMIT_RANGE_PRODUCT_FLAG,
|
||||||
EMIT_RANGE_PD_PRODUCT_FLAG,
|
EMIT_RANGE_PD_PRODUCT_FLAG,
|
||||||
EMIT_RANGE_DIAGNOSTIC_FLAG,
|
EMIT_RANGE_DIAGNOSTIC_FLAG,
|
||||||
|
EMIT_RANGE_PD_DIAGNOSTIC_FLAG,
|
||||||
EMIT_RANGE_EXPERIMENTAL_FLAG,
|
EMIT_RANGE_EXPERIMENTAL_FLAG,
|
||||||
EMIT_RANGE_NOTPRODUCT_FLAG,
|
EMIT_RANGE_NOTPRODUCT_FLAG,
|
||||||
EMIT_RANGE_MANAGEABLE_FLAG,
|
EMIT_RANGE_MANAGEABLE_FLAG,
|
||||||
|
@ -108,6 +108,7 @@ void emit_writeable_double(const char* name, CommandLineFlagWriteable::Writeable
|
|||||||
#define EMIT_WRITEABLE_PD_PRODUCT_FLAG(type, name, doc) ); emit_writeable_##type(#name
|
#define EMIT_WRITEABLE_PD_PRODUCT_FLAG(type, name, doc) ); emit_writeable_##type(#name
|
||||||
#define EMIT_WRITEABLE_DEVELOPER_FLAG(type, name, value, doc) ); emit_writeable_##type(#name
|
#define EMIT_WRITEABLE_DEVELOPER_FLAG(type, name, value, doc) ); emit_writeable_##type(#name
|
||||||
#define EMIT_WRITEABLE_PD_DEVELOPER_FLAG(type, name, doc) ); emit_writeable_##type(#name
|
#define EMIT_WRITEABLE_PD_DEVELOPER_FLAG(type, name, doc) ); emit_writeable_##type(#name
|
||||||
|
#define EMIT_WRITEABLE_PD_DIAGNOSTIC_FLAG(type, name, doc) ); emit_writeable_##type(#name
|
||||||
#define EMIT_WRITEABLE_NOTPRODUCT_FLAG(type, name, value, doc) ); emit_writeable_##type(#name
|
#define EMIT_WRITEABLE_NOTPRODUCT_FLAG(type, name, value, doc) ); emit_writeable_##type(#name
|
||||||
#define EMIT_WRITEABLE_LP64_PRODUCT_FLAG(type, name, value, doc) ); emit_writeable_##type(#name
|
#define EMIT_WRITEABLE_LP64_PRODUCT_FLAG(type, name, value, doc) ); emit_writeable_##type(#name
|
||||||
|
|
||||||
@ -126,6 +127,7 @@ void CommandLineFlagWriteableList::init(void) {
|
|||||||
EMIT_WRITEABLE_PRODUCT_FLAG,
|
EMIT_WRITEABLE_PRODUCT_FLAG,
|
||||||
EMIT_WRITEABLE_PD_PRODUCT_FLAG,
|
EMIT_WRITEABLE_PD_PRODUCT_FLAG,
|
||||||
EMIT_WRITEABLE_DIAGNOSTIC_FLAG,
|
EMIT_WRITEABLE_DIAGNOSTIC_FLAG,
|
||||||
|
EMIT_WRITEABLE_PD_DIAGNOSTIC_FLAG,
|
||||||
EMIT_WRITEABLE_EXPERIMENTAL_FLAG,
|
EMIT_WRITEABLE_EXPERIMENTAL_FLAG,
|
||||||
EMIT_WRITEABLE_NOTPRODUCT_FLAG,
|
EMIT_WRITEABLE_NOTPRODUCT_FLAG,
|
||||||
EMIT_WRITEABLE_MANAGEABLE_FLAG,
|
EMIT_WRITEABLE_MANAGEABLE_FLAG,
|
||||||
@ -152,6 +154,7 @@ void CommandLineFlagWriteableList::init(void) {
|
|||||||
EMIT_WRITEABLE_PRODUCT_FLAG,
|
EMIT_WRITEABLE_PRODUCT_FLAG,
|
||||||
EMIT_WRITEABLE_PD_PRODUCT_FLAG,
|
EMIT_WRITEABLE_PD_PRODUCT_FLAG,
|
||||||
EMIT_WRITEABLE_DIAGNOSTIC_FLAG,
|
EMIT_WRITEABLE_DIAGNOSTIC_FLAG,
|
||||||
|
EMIT_WRITEABLE_PD_DIAGNOSTIC_FLAG,
|
||||||
EMIT_WRITEABLE_EXPERIMENTAL_FLAG,
|
EMIT_WRITEABLE_EXPERIMENTAL_FLAG,
|
||||||
EMIT_WRITEABLE_NOTPRODUCT_FLAG,
|
EMIT_WRITEABLE_NOTPRODUCT_FLAG,
|
||||||
IGNORE_RANGE,
|
IGNORE_RANGE,
|
||||||
@ -165,6 +168,7 @@ void CommandLineFlagWriteableList::init(void) {
|
|||||||
EMIT_WRITEABLE_PRODUCT_FLAG,
|
EMIT_WRITEABLE_PRODUCT_FLAG,
|
||||||
EMIT_WRITEABLE_PD_PRODUCT_FLAG,
|
EMIT_WRITEABLE_PD_PRODUCT_FLAG,
|
||||||
EMIT_WRITEABLE_DIAGNOSTIC_FLAG,
|
EMIT_WRITEABLE_DIAGNOSTIC_FLAG,
|
||||||
|
EMIT_WRITEABLE_PD_DIAGNOSTIC_FLAG,
|
||||||
EMIT_WRITEABLE_NOTPRODUCT_FLAG,
|
EMIT_WRITEABLE_NOTPRODUCT_FLAG,
|
||||||
IGNORE_RANGE,
|
IGNORE_RANGE,
|
||||||
IGNORE_CONSTRAINT,
|
IGNORE_CONSTRAINT,
|
||||||
@ -177,6 +181,7 @@ void CommandLineFlagWriteableList::init(void) {
|
|||||||
EMIT_WRITEABLE_PRODUCT_FLAG,
|
EMIT_WRITEABLE_PRODUCT_FLAG,
|
||||||
EMIT_WRITEABLE_PD_PRODUCT_FLAG,
|
EMIT_WRITEABLE_PD_PRODUCT_FLAG,
|
||||||
EMIT_WRITEABLE_DIAGNOSTIC_FLAG,
|
EMIT_WRITEABLE_DIAGNOSTIC_FLAG,
|
||||||
|
EMIT_WRITEABLE_PD_DIAGNOSTIC_FLAG,
|
||||||
EMIT_WRITEABLE_EXPERIMENTAL_FLAG,
|
EMIT_WRITEABLE_EXPERIMENTAL_FLAG,
|
||||||
EMIT_WRITEABLE_NOTPRODUCT_FLAG,
|
EMIT_WRITEABLE_NOTPRODUCT_FLAG,
|
||||||
IGNORE_RANGE,
|
IGNORE_RANGE,
|
||||||
@ -190,6 +195,7 @@ void CommandLineFlagWriteableList::init(void) {
|
|||||||
EMIT_WRITEABLE_PRODUCT_FLAG,
|
EMIT_WRITEABLE_PRODUCT_FLAG,
|
||||||
EMIT_WRITEABLE_PD_PRODUCT_FLAG,
|
EMIT_WRITEABLE_PD_PRODUCT_FLAG,
|
||||||
EMIT_WRITEABLE_DIAGNOSTIC_FLAG,
|
EMIT_WRITEABLE_DIAGNOSTIC_FLAG,
|
||||||
|
EMIT_WRITEABLE_PD_DIAGNOSTIC_FLAG,
|
||||||
EMIT_WRITEABLE_EXPERIMENTAL_FLAG,
|
EMIT_WRITEABLE_EXPERIMENTAL_FLAG,
|
||||||
EMIT_WRITEABLE_NOTPRODUCT_FLAG,
|
EMIT_WRITEABLE_NOTPRODUCT_FLAG,
|
||||||
EMIT_WRITEABLE_MANAGEABLE_FLAG,
|
EMIT_WRITEABLE_MANAGEABLE_FLAG,
|
||||||
|
@ -58,6 +58,7 @@ RUNTIME_FLAGS(MATERIALIZE_DEVELOPER_FLAG, \
|
|||||||
MATERIALIZE_PRODUCT_FLAG, \
|
MATERIALIZE_PRODUCT_FLAG, \
|
||||||
MATERIALIZE_PD_PRODUCT_FLAG, \
|
MATERIALIZE_PD_PRODUCT_FLAG, \
|
||||||
MATERIALIZE_DIAGNOSTIC_FLAG, \
|
MATERIALIZE_DIAGNOSTIC_FLAG, \
|
||||||
|
MATERIALIZE_PD_DIAGNOSTIC_FLAG, \
|
||||||
MATERIALIZE_EXPERIMENTAL_FLAG, \
|
MATERIALIZE_EXPERIMENTAL_FLAG, \
|
||||||
MATERIALIZE_NOTPRODUCT_FLAG, \
|
MATERIALIZE_NOTPRODUCT_FLAG, \
|
||||||
MATERIALIZE_MANAGEABLE_FLAG, \
|
MATERIALIZE_MANAGEABLE_FLAG, \
|
||||||
@ -72,6 +73,7 @@ RUNTIME_OS_FLAGS(MATERIALIZE_DEVELOPER_FLAG, \
|
|||||||
MATERIALIZE_PRODUCT_FLAG, \
|
MATERIALIZE_PRODUCT_FLAG, \
|
||||||
MATERIALIZE_PD_PRODUCT_FLAG, \
|
MATERIALIZE_PD_PRODUCT_FLAG, \
|
||||||
MATERIALIZE_DIAGNOSTIC_FLAG, \
|
MATERIALIZE_DIAGNOSTIC_FLAG, \
|
||||||
|
MATERIALIZE_PD_DIAGNOSTIC_FLAG, \
|
||||||
MATERIALIZE_NOTPRODUCT_FLAG, \
|
MATERIALIZE_NOTPRODUCT_FLAG, \
|
||||||
IGNORE_RANGE, \
|
IGNORE_RANGE, \
|
||||||
IGNORE_CONSTRAINT, \
|
IGNORE_CONSTRAINT, \
|
||||||
@ -650,6 +652,7 @@ const char* Flag::flag_error_str(Flag::Error error) {
|
|||||||
#define RUNTIME_PRODUCT_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_PRODUCT) },
|
#define RUNTIME_PRODUCT_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_PRODUCT) },
|
||||||
#define RUNTIME_PD_PRODUCT_FLAG_STRUCT( type, name, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_PRODUCT | Flag::KIND_PLATFORM_DEPENDENT) },
|
#define RUNTIME_PD_PRODUCT_FLAG_STRUCT( type, name, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_PRODUCT | Flag::KIND_PLATFORM_DEPENDENT) },
|
||||||
#define RUNTIME_DIAGNOSTIC_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_DIAGNOSTIC) },
|
#define RUNTIME_DIAGNOSTIC_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_DIAGNOSTIC) },
|
||||||
|
#define RUNTIME_PD_DIAGNOSTIC_FLAG_STRUCT(type, name, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_DIAGNOSTIC | Flag::KIND_PLATFORM_DEPENDENT) },
|
||||||
#define RUNTIME_EXPERIMENTAL_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_EXPERIMENTAL) },
|
#define RUNTIME_EXPERIMENTAL_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_EXPERIMENTAL) },
|
||||||
#define RUNTIME_MANAGEABLE_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_MANAGEABLE) },
|
#define RUNTIME_MANAGEABLE_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_MANAGEABLE) },
|
||||||
#define RUNTIME_PRODUCT_RW_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_PRODUCT | Flag::KIND_READ_WRITE) },
|
#define RUNTIME_PRODUCT_RW_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_PRODUCT | Flag::KIND_READ_WRITE) },
|
||||||
@ -660,6 +663,7 @@ const char* Flag::flag_error_str(Flag::Error error) {
|
|||||||
#define JVMCI_PRODUCT_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_JVMCI | Flag::KIND_PRODUCT) },
|
#define JVMCI_PRODUCT_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_JVMCI | Flag::KIND_PRODUCT) },
|
||||||
#define JVMCI_PD_PRODUCT_FLAG_STRUCT( type, name, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_JVMCI | Flag::KIND_PRODUCT | Flag::KIND_PLATFORM_DEPENDENT) },
|
#define JVMCI_PD_PRODUCT_FLAG_STRUCT( type, name, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_JVMCI | Flag::KIND_PRODUCT | Flag::KIND_PLATFORM_DEPENDENT) },
|
||||||
#define JVMCI_DIAGNOSTIC_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_JVMCI | Flag::KIND_DIAGNOSTIC) },
|
#define JVMCI_DIAGNOSTIC_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_JVMCI | Flag::KIND_DIAGNOSTIC) },
|
||||||
|
#define JVMCI_PD_DIAGNOSTIC_FLAG_STRUCT( type, name, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_JVMCI | Flag::KIND_DIAGNOSTIC | Flag::KIND_PLATFORM_DEPENDENT) },
|
||||||
#define JVMCI_EXPERIMENTAL_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_JVMCI | Flag::KIND_EXPERIMENTAL) },
|
#define JVMCI_EXPERIMENTAL_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_JVMCI | Flag::KIND_EXPERIMENTAL) },
|
||||||
#define JVMCI_DEVELOP_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), (void*) &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_JVMCI | Flag::KIND_DEVELOP) },
|
#define JVMCI_DEVELOP_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), (void*) &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_JVMCI | Flag::KIND_DEVELOP) },
|
||||||
#define JVMCI_PD_DEVELOP_FLAG_STRUCT( type, name, doc) { #type, XSTR(name), (void*) &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_JVMCI | Flag::KIND_DEVELOP | Flag::KIND_PLATFORM_DEPENDENT) },
|
#define JVMCI_PD_DEVELOP_FLAG_STRUCT( type, name, doc) { #type, XSTR(name), (void*) &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_JVMCI | Flag::KIND_DEVELOP | Flag::KIND_PLATFORM_DEPENDENT) },
|
||||||
@ -674,6 +678,7 @@ const char* Flag::flag_error_str(Flag::Error error) {
|
|||||||
#define C1_PRODUCT_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_C1 | Flag::KIND_PRODUCT) },
|
#define C1_PRODUCT_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_C1 | Flag::KIND_PRODUCT) },
|
||||||
#define C1_PD_PRODUCT_FLAG_STRUCT( type, name, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_C1 | Flag::KIND_PRODUCT | Flag::KIND_PLATFORM_DEPENDENT) },
|
#define C1_PD_PRODUCT_FLAG_STRUCT( type, name, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_C1 | Flag::KIND_PRODUCT | Flag::KIND_PLATFORM_DEPENDENT) },
|
||||||
#define C1_DIAGNOSTIC_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_C1 | Flag::KIND_DIAGNOSTIC) },
|
#define C1_DIAGNOSTIC_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_C1 | Flag::KIND_DIAGNOSTIC) },
|
||||||
|
#define C1_PD_DIAGNOSTIC_FLAG_STRUCT( type, name, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_C1 | Flag::KIND_DIAGNOSTIC | Flag::KIND_PLATFORM_DEPENDENT) },
|
||||||
#define C1_DEVELOP_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), (void*) &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_C1 | Flag::KIND_DEVELOP) },
|
#define C1_DEVELOP_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), (void*) &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_C1 | Flag::KIND_DEVELOP) },
|
||||||
#define C1_PD_DEVELOP_FLAG_STRUCT( type, name, doc) { #type, XSTR(name), (void*) &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_C1 | Flag::KIND_DEVELOP | Flag::KIND_PLATFORM_DEPENDENT) },
|
#define C1_PD_DEVELOP_FLAG_STRUCT( type, name, doc) { #type, XSTR(name), (void*) &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_C1 | Flag::KIND_DEVELOP | Flag::KIND_PLATFORM_DEPENDENT) },
|
||||||
#define C1_NOTPRODUCT_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), (void*) &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_C1 | Flag::KIND_NOT_PRODUCT) },
|
#define C1_NOTPRODUCT_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), (void*) &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_C1 | Flag::KIND_NOT_PRODUCT) },
|
||||||
@ -681,6 +686,7 @@ const char* Flag::flag_error_str(Flag::Error error) {
|
|||||||
#define C2_PRODUCT_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_C2 | Flag::KIND_PRODUCT) },
|
#define C2_PRODUCT_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_C2 | Flag::KIND_PRODUCT) },
|
||||||
#define C2_PD_PRODUCT_FLAG_STRUCT( type, name, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_C2 | Flag::KIND_PRODUCT | Flag::KIND_PLATFORM_DEPENDENT) },
|
#define C2_PD_PRODUCT_FLAG_STRUCT( type, name, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_C2 | Flag::KIND_PRODUCT | Flag::KIND_PLATFORM_DEPENDENT) },
|
||||||
#define C2_DIAGNOSTIC_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_C2 | Flag::KIND_DIAGNOSTIC) },
|
#define C2_DIAGNOSTIC_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_C2 | Flag::KIND_DIAGNOSTIC) },
|
||||||
|
#define C2_PD_DIAGNOSTIC_FLAG_STRUCT( type, name, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_C2 | Flag::KIND_DIAGNOSTIC | Flag::KIND_PLATFORM_DEPENDENT) },
|
||||||
#define C2_EXPERIMENTAL_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_C2 | Flag::KIND_EXPERIMENTAL) },
|
#define C2_EXPERIMENTAL_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_C2 | Flag::KIND_EXPERIMENTAL) },
|
||||||
#define C2_DEVELOP_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), (void*) &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_C2 | Flag::KIND_DEVELOP) },
|
#define C2_DEVELOP_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), (void*) &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_C2 | Flag::KIND_DEVELOP) },
|
||||||
#define C2_PD_DEVELOP_FLAG_STRUCT( type, name, doc) { #type, XSTR(name), (void*) &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_C2 | Flag::KIND_DEVELOP | Flag::KIND_PLATFORM_DEPENDENT) },
|
#define C2_PD_DEVELOP_FLAG_STRUCT( type, name, doc) { #type, XSTR(name), (void*) &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_C2 | Flag::KIND_DEVELOP | Flag::KIND_PLATFORM_DEPENDENT) },
|
||||||
@ -695,6 +701,7 @@ const char* Flag::flag_error_str(Flag::Error error) {
|
|||||||
#define SHARK_PRODUCT_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_SHARK | Flag::KIND_PRODUCT) },
|
#define SHARK_PRODUCT_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_SHARK | Flag::KIND_PRODUCT) },
|
||||||
#define SHARK_PD_PRODUCT_FLAG_STRUCT( type, name, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_SHARK | Flag::KIND_PRODUCT | Flag::KIND_PLATFORM_DEPENDENT) },
|
#define SHARK_PD_PRODUCT_FLAG_STRUCT( type, name, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_SHARK | Flag::KIND_PRODUCT | Flag::KIND_PLATFORM_DEPENDENT) },
|
||||||
#define SHARK_DIAGNOSTIC_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_SHARK | Flag::KIND_DIAGNOSTIC) },
|
#define SHARK_DIAGNOSTIC_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_SHARK | Flag::KIND_DIAGNOSTIC) },
|
||||||
|
#define SHARK_PD_DIAGNOSTIC_FLAG_STRUCT( type, name, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_SHARK | Flag::KIND_DIAGNOSTIC | Flag::KIND_PLATFORM_DEPENDENT) },
|
||||||
#define SHARK_DEVELOP_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), (void*) &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_SHARK | Flag::KIND_DEVELOP) },
|
#define SHARK_DEVELOP_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), (void*) &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_SHARK | Flag::KIND_DEVELOP) },
|
||||||
#define SHARK_PD_DEVELOP_FLAG_STRUCT( type, name, doc) { #type, XSTR(name), (void*) &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_SHARK | Flag::KIND_DEVELOP | Flag::KIND_PLATFORM_DEPENDENT) },
|
#define SHARK_PD_DEVELOP_FLAG_STRUCT( type, name, doc) { #type, XSTR(name), (void*) &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_SHARK | Flag::KIND_DEVELOP | Flag::KIND_PLATFORM_DEPENDENT) },
|
||||||
#define SHARK_NOTPRODUCT_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), (void*) &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_SHARK | Flag::KIND_NOT_PRODUCT) },
|
#define SHARK_NOTPRODUCT_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), (void*) &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_SHARK | Flag::KIND_NOT_PRODUCT) },
|
||||||
@ -705,6 +712,7 @@ static Flag flagTable[] = {
|
|||||||
RUNTIME_PRODUCT_FLAG_STRUCT, \
|
RUNTIME_PRODUCT_FLAG_STRUCT, \
|
||||||
RUNTIME_PD_PRODUCT_FLAG_STRUCT, \
|
RUNTIME_PD_PRODUCT_FLAG_STRUCT, \
|
||||||
RUNTIME_DIAGNOSTIC_FLAG_STRUCT, \
|
RUNTIME_DIAGNOSTIC_FLAG_STRUCT, \
|
||||||
|
RUNTIME_PD_DIAGNOSTIC_FLAG_STRUCT, \
|
||||||
RUNTIME_EXPERIMENTAL_FLAG_STRUCT, \
|
RUNTIME_EXPERIMENTAL_FLAG_STRUCT, \
|
||||||
RUNTIME_NOTPRODUCT_FLAG_STRUCT, \
|
RUNTIME_NOTPRODUCT_FLAG_STRUCT, \
|
||||||
RUNTIME_MANAGEABLE_FLAG_STRUCT, \
|
RUNTIME_MANAGEABLE_FLAG_STRUCT, \
|
||||||
@ -718,6 +726,7 @@ static Flag flagTable[] = {
|
|||||||
RUNTIME_PRODUCT_FLAG_STRUCT, \
|
RUNTIME_PRODUCT_FLAG_STRUCT, \
|
||||||
RUNTIME_PD_PRODUCT_FLAG_STRUCT, \
|
RUNTIME_PD_PRODUCT_FLAG_STRUCT, \
|
||||||
RUNTIME_DIAGNOSTIC_FLAG_STRUCT, \
|
RUNTIME_DIAGNOSTIC_FLAG_STRUCT, \
|
||||||
|
RUNTIME_PD_DIAGNOSTIC_FLAG_STRUCT, \
|
||||||
RUNTIME_NOTPRODUCT_FLAG_STRUCT, \
|
RUNTIME_NOTPRODUCT_FLAG_STRUCT, \
|
||||||
IGNORE_RANGE, \
|
IGNORE_RANGE, \
|
||||||
IGNORE_CONSTRAINT, \
|
IGNORE_CONSTRAINT, \
|
||||||
@ -728,6 +737,7 @@ static Flag flagTable[] = {
|
|||||||
RUNTIME_PRODUCT_FLAG_STRUCT, \
|
RUNTIME_PRODUCT_FLAG_STRUCT, \
|
||||||
RUNTIME_PD_PRODUCT_FLAG_STRUCT, \
|
RUNTIME_PD_PRODUCT_FLAG_STRUCT, \
|
||||||
RUNTIME_DIAGNOSTIC_FLAG_STRUCT, \
|
RUNTIME_DIAGNOSTIC_FLAG_STRUCT, \
|
||||||
|
RUNTIME_PD_DIAGNOSTIC_FLAG_STRUCT, \
|
||||||
RUNTIME_EXPERIMENTAL_FLAG_STRUCT, \
|
RUNTIME_EXPERIMENTAL_FLAG_STRUCT, \
|
||||||
RUNTIME_NOTPRODUCT_FLAG_STRUCT, \
|
RUNTIME_NOTPRODUCT_FLAG_STRUCT, \
|
||||||
RUNTIME_MANAGEABLE_FLAG_STRUCT, \
|
RUNTIME_MANAGEABLE_FLAG_STRUCT, \
|
||||||
@ -742,6 +752,7 @@ static Flag flagTable[] = {
|
|||||||
JVMCI_PRODUCT_FLAG_STRUCT, \
|
JVMCI_PRODUCT_FLAG_STRUCT, \
|
||||||
JVMCI_PD_PRODUCT_FLAG_STRUCT, \
|
JVMCI_PD_PRODUCT_FLAG_STRUCT, \
|
||||||
JVMCI_DIAGNOSTIC_FLAG_STRUCT, \
|
JVMCI_DIAGNOSTIC_FLAG_STRUCT, \
|
||||||
|
JVMCI_PD_DIAGNOSTIC_FLAG_STRUCT, \
|
||||||
JVMCI_EXPERIMENTAL_FLAG_STRUCT, \
|
JVMCI_EXPERIMENTAL_FLAG_STRUCT, \
|
||||||
JVMCI_NOTPRODUCT_FLAG_STRUCT, \
|
JVMCI_NOTPRODUCT_FLAG_STRUCT, \
|
||||||
IGNORE_RANGE, \
|
IGNORE_RANGE, \
|
||||||
@ -754,6 +765,7 @@ static Flag flagTable[] = {
|
|||||||
C1_PRODUCT_FLAG_STRUCT, \
|
C1_PRODUCT_FLAG_STRUCT, \
|
||||||
C1_PD_PRODUCT_FLAG_STRUCT, \
|
C1_PD_PRODUCT_FLAG_STRUCT, \
|
||||||
C1_DIAGNOSTIC_FLAG_STRUCT, \
|
C1_DIAGNOSTIC_FLAG_STRUCT, \
|
||||||
|
C1_PD_DIAGNOSTIC_FLAG_STRUCT, \
|
||||||
C1_NOTPRODUCT_FLAG_STRUCT, \
|
C1_NOTPRODUCT_FLAG_STRUCT, \
|
||||||
IGNORE_RANGE, \
|
IGNORE_RANGE, \
|
||||||
IGNORE_CONSTRAINT, \
|
IGNORE_CONSTRAINT, \
|
||||||
@ -765,6 +777,7 @@ static Flag flagTable[] = {
|
|||||||
C2_PRODUCT_FLAG_STRUCT, \
|
C2_PRODUCT_FLAG_STRUCT, \
|
||||||
C2_PD_PRODUCT_FLAG_STRUCT, \
|
C2_PD_PRODUCT_FLAG_STRUCT, \
|
||||||
C2_DIAGNOSTIC_FLAG_STRUCT, \
|
C2_DIAGNOSTIC_FLAG_STRUCT, \
|
||||||
|
C2_PD_DIAGNOSTIC_FLAG_STRUCT, \
|
||||||
C2_EXPERIMENTAL_FLAG_STRUCT, \
|
C2_EXPERIMENTAL_FLAG_STRUCT, \
|
||||||
C2_NOTPRODUCT_FLAG_STRUCT, \
|
C2_NOTPRODUCT_FLAG_STRUCT, \
|
||||||
IGNORE_RANGE, \
|
IGNORE_RANGE, \
|
||||||
@ -777,6 +790,7 @@ static Flag flagTable[] = {
|
|||||||
SHARK_PRODUCT_FLAG_STRUCT, \
|
SHARK_PRODUCT_FLAG_STRUCT, \
|
||||||
SHARK_PD_PRODUCT_FLAG_STRUCT, \
|
SHARK_PD_PRODUCT_FLAG_STRUCT, \
|
||||||
SHARK_DIAGNOSTIC_FLAG_STRUCT, \
|
SHARK_DIAGNOSTIC_FLAG_STRUCT, \
|
||||||
|
SHARK_PD_DIAGNOSTIC_FLAG_STRUCT, \
|
||||||
SHARK_NOTPRODUCT_FLAG_STRUCT, \
|
SHARK_NOTPRODUCT_FLAG_STRUCT, \
|
||||||
IGNORE_RANGE, \
|
IGNORE_RANGE, \
|
||||||
IGNORE_CONSTRAINT, \
|
IGNORE_CONSTRAINT, \
|
||||||
|
@ -644,6 +644,7 @@ public:
|
|||||||
product, \
|
product, \
|
||||||
product_pd, \
|
product_pd, \
|
||||||
diagnostic, \
|
diagnostic, \
|
||||||
|
diagnostic_pd, \
|
||||||
experimental, \
|
experimental, \
|
||||||
notproduct, \
|
notproduct, \
|
||||||
manageable, \
|
manageable, \
|
||||||
@ -2529,7 +2530,7 @@ public:
|
|||||||
develop(bool, GenerateRangeChecks, true, \
|
develop(bool, GenerateRangeChecks, true, \
|
||||||
"Generate range checks for array accesses") \
|
"Generate range checks for array accesses") \
|
||||||
\
|
\
|
||||||
develop_pd(bool, ImplicitNullChecks, \
|
diagnostic_pd(bool, ImplicitNullChecks, \
|
||||||
"Generate code for implicit null checks") \
|
"Generate code for implicit null checks") \
|
||||||
\
|
\
|
||||||
product_pd(bool, TrapBasedNullChecks, \
|
product_pd(bool, TrapBasedNullChecks, \
|
||||||
@ -3163,7 +3164,7 @@ public:
|
|||||||
"Ratio of call site execution to caller method invocation") \
|
"Ratio of call site execution to caller method invocation") \
|
||||||
range(0, max_jint) \
|
range(0, max_jint) \
|
||||||
\
|
\
|
||||||
develop_pd(intx, InlineFrequencyCount, \
|
diagnostic_pd(intx, InlineFrequencyCount, \
|
||||||
"Count of call site execution necessary to trigger frequent " \
|
"Count of call site execution necessary to trigger frequent " \
|
||||||
"inlining") \
|
"inlining") \
|
||||||
range(0, max_jint) \
|
range(0, max_jint) \
|
||||||
@ -4144,7 +4145,7 @@ public:
|
|||||||
"in the loaded class C. " \
|
"in the loaded class C. " \
|
||||||
"Check (3) is available only in debug builds.") \
|
"Check (3) is available only in debug builds.") \
|
||||||
\
|
\
|
||||||
develop_pd(intx, InitArrayShortSize, \
|
diagnostic_pd(intx, InitArrayShortSize, \
|
||||||
"Threshold small size (in bytes) for clearing arrays. " \
|
"Threshold small size (in bytes) for clearing arrays. " \
|
||||||
"Anything this size or smaller may get converted to discrete " \
|
"Anything this size or smaller may get converted to discrete " \
|
||||||
"scalar stores.") \
|
"scalar stores.") \
|
||||||
@ -4168,6 +4169,7 @@ public:
|
|||||||
#define DECLARE_PRODUCT_FLAG(type, name, value, doc) extern "C" type name;
|
#define DECLARE_PRODUCT_FLAG(type, name, value, doc) extern "C" type name;
|
||||||
#define DECLARE_PD_PRODUCT_FLAG(type, name, doc) extern "C" type name;
|
#define DECLARE_PD_PRODUCT_FLAG(type, name, doc) extern "C" type name;
|
||||||
#define DECLARE_DIAGNOSTIC_FLAG(type, name, value, doc) extern "C" type name;
|
#define DECLARE_DIAGNOSTIC_FLAG(type, name, value, doc) extern "C" type name;
|
||||||
|
#define DECLARE_PD_DIAGNOSTIC_FLAG(type, name, doc) extern "C" type name;
|
||||||
#define DECLARE_EXPERIMENTAL_FLAG(type, name, value, doc) extern "C" type name;
|
#define DECLARE_EXPERIMENTAL_FLAG(type, name, value, doc) extern "C" type name;
|
||||||
#define DECLARE_MANAGEABLE_FLAG(type, name, value, doc) extern "C" type name;
|
#define DECLARE_MANAGEABLE_FLAG(type, name, value, doc) extern "C" type name;
|
||||||
#define DECLARE_PRODUCT_RW_FLAG(type, name, value, doc) extern "C" type name;
|
#define DECLARE_PRODUCT_RW_FLAG(type, name, value, doc) extern "C" type name;
|
||||||
@ -4191,6 +4193,7 @@ public:
|
|||||||
#define MATERIALIZE_PRODUCT_FLAG(type, name, value, doc) type name = value;
|
#define MATERIALIZE_PRODUCT_FLAG(type, name, value, doc) type name = value;
|
||||||
#define MATERIALIZE_PD_PRODUCT_FLAG(type, name, doc) type name = pd_##name;
|
#define MATERIALIZE_PD_PRODUCT_FLAG(type, name, doc) type name = pd_##name;
|
||||||
#define MATERIALIZE_DIAGNOSTIC_FLAG(type, name, value, doc) type name = value;
|
#define MATERIALIZE_DIAGNOSTIC_FLAG(type, name, value, doc) type name = value;
|
||||||
|
#define MATERIALIZE_PD_DIAGNOSTIC_FLAG(type, name, doc) type name = pd_##name;
|
||||||
#define MATERIALIZE_EXPERIMENTAL_FLAG(type, name, value, doc) type name = value;
|
#define MATERIALIZE_EXPERIMENTAL_FLAG(type, name, value, doc) type name = value;
|
||||||
#define MATERIALIZE_MANAGEABLE_FLAG(type, name, value, doc) type name = value;
|
#define MATERIALIZE_MANAGEABLE_FLAG(type, name, value, doc) type name = value;
|
||||||
#define MATERIALIZE_PRODUCT_RW_FLAG(type, name, value, doc) type name = value;
|
#define MATERIALIZE_PRODUCT_RW_FLAG(type, name, value, doc) type name = value;
|
||||||
@ -4221,6 +4224,7 @@ RUNTIME_FLAGS(DECLARE_DEVELOPER_FLAG, \
|
|||||||
DECLARE_PRODUCT_FLAG, \
|
DECLARE_PRODUCT_FLAG, \
|
||||||
DECLARE_PD_PRODUCT_FLAG, \
|
DECLARE_PD_PRODUCT_FLAG, \
|
||||||
DECLARE_DIAGNOSTIC_FLAG, \
|
DECLARE_DIAGNOSTIC_FLAG, \
|
||||||
|
DECLARE_PD_DIAGNOSTIC_FLAG, \
|
||||||
DECLARE_EXPERIMENTAL_FLAG, \
|
DECLARE_EXPERIMENTAL_FLAG, \
|
||||||
DECLARE_NOTPRODUCT_FLAG, \
|
DECLARE_NOTPRODUCT_FLAG, \
|
||||||
DECLARE_MANAGEABLE_FLAG, \
|
DECLARE_MANAGEABLE_FLAG, \
|
||||||
@ -4235,6 +4239,7 @@ RUNTIME_OS_FLAGS(DECLARE_DEVELOPER_FLAG, \
|
|||||||
DECLARE_PRODUCT_FLAG, \
|
DECLARE_PRODUCT_FLAG, \
|
||||||
DECLARE_PD_PRODUCT_FLAG, \
|
DECLARE_PD_PRODUCT_FLAG, \
|
||||||
DECLARE_DIAGNOSTIC_FLAG, \
|
DECLARE_DIAGNOSTIC_FLAG, \
|
||||||
|
DECLARE_PD_DIAGNOSTIC_FLAG, \
|
||||||
DECLARE_NOTPRODUCT_FLAG, \
|
DECLARE_NOTPRODUCT_FLAG, \
|
||||||
IGNORE_RANGE, \
|
IGNORE_RANGE, \
|
||||||
IGNORE_CONSTRAINT, \
|
IGNORE_CONSTRAINT, \
|
||||||
|
@ -49,6 +49,7 @@
|
|||||||
#define RUNTIME_PRODUCT_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
|
#define RUNTIME_PRODUCT_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
|
||||||
#define RUNTIME_PD_PRODUCT_FLAG_MEMBER(type, name, doc) FLAG_MEMBER(name),
|
#define RUNTIME_PD_PRODUCT_FLAG_MEMBER(type, name, doc) FLAG_MEMBER(name),
|
||||||
#define RUNTIME_DIAGNOSTIC_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
|
#define RUNTIME_DIAGNOSTIC_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
|
||||||
|
#define RUNTIME_PD_DIAGNOSTIC_FLAG_MEMBER(type, name, doc) FLAG_MEMBER(name),
|
||||||
#define RUNTIME_EXPERIMENTAL_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
|
#define RUNTIME_EXPERIMENTAL_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
|
||||||
#define RUNTIME_MANAGEABLE_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
|
#define RUNTIME_MANAGEABLE_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
|
||||||
#define RUNTIME_PRODUCT_RW_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
|
#define RUNTIME_PRODUCT_RW_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
|
||||||
@ -61,6 +62,7 @@
|
|||||||
#define JVMCI_DEVELOP_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
|
#define JVMCI_DEVELOP_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
|
||||||
#define JVMCI_PD_DEVELOP_FLAG_MEMBER(type, name, doc) FLAG_MEMBER(name),
|
#define JVMCI_PD_DEVELOP_FLAG_MEMBER(type, name, doc) FLAG_MEMBER(name),
|
||||||
#define JVMCI_DIAGNOSTIC_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
|
#define JVMCI_DIAGNOSTIC_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
|
||||||
|
#define JVMCI_PD_DIAGNOSTIC_FLAG_MEMBER(type, name, doc) FLAG_MEMBER(name),
|
||||||
#define JVMCI_EXPERIMENTAL_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
|
#define JVMCI_EXPERIMENTAL_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
|
||||||
#define JVMCI_NOTPRODUCT_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
|
#define JVMCI_NOTPRODUCT_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
|
||||||
|
|
||||||
@ -73,6 +75,7 @@
|
|||||||
#define C1_PRODUCT_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
|
#define C1_PRODUCT_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
|
||||||
#define C1_PD_PRODUCT_FLAG_MEMBER(type, name, doc) FLAG_MEMBER(name),
|
#define C1_PD_PRODUCT_FLAG_MEMBER(type, name, doc) FLAG_MEMBER(name),
|
||||||
#define C1_DIAGNOSTIC_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
|
#define C1_DIAGNOSTIC_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
|
||||||
|
#define C1_PD_DIAGNOSTIC_FLAG_MEMBER(type, name, doc) FLAG_MEMBER(name),
|
||||||
#define C1_DEVELOP_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
|
#define C1_DEVELOP_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
|
||||||
#define C1_PD_DEVELOP_FLAG_MEMBER(type, name, doc) FLAG_MEMBER(name),
|
#define C1_PD_DEVELOP_FLAG_MEMBER(type, name, doc) FLAG_MEMBER(name),
|
||||||
#define C1_NOTPRODUCT_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
|
#define C1_NOTPRODUCT_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
|
||||||
@ -80,6 +83,7 @@
|
|||||||
#define C2_PRODUCT_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
|
#define C2_PRODUCT_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
|
||||||
#define C2_PD_PRODUCT_FLAG_MEMBER(type, name, doc) FLAG_MEMBER(name),
|
#define C2_PD_PRODUCT_FLAG_MEMBER(type, name, doc) FLAG_MEMBER(name),
|
||||||
#define C2_DIAGNOSTIC_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
|
#define C2_DIAGNOSTIC_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
|
||||||
|
#define C2_PD_DIAGNOSTIC_FLAG_MEMBER(type, name, doc) FLAG_MEMBER(name),
|
||||||
#define C2_EXPERIMENTAL_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
|
#define C2_EXPERIMENTAL_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
|
||||||
#define C2_DEVELOP_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
|
#define C2_DEVELOP_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
|
||||||
#define C2_PD_DEVELOP_FLAG_MEMBER(type, name, doc) FLAG_MEMBER(name),
|
#define C2_PD_DEVELOP_FLAG_MEMBER(type, name, doc) FLAG_MEMBER(name),
|
||||||
@ -97,6 +101,7 @@ typedef enum {
|
|||||||
RUNTIME_PRODUCT_FLAG_MEMBER, \
|
RUNTIME_PRODUCT_FLAG_MEMBER, \
|
||||||
RUNTIME_PD_PRODUCT_FLAG_MEMBER, \
|
RUNTIME_PD_PRODUCT_FLAG_MEMBER, \
|
||||||
RUNTIME_DIAGNOSTIC_FLAG_MEMBER, \
|
RUNTIME_DIAGNOSTIC_FLAG_MEMBER, \
|
||||||
|
RUNTIME_PD_DIAGNOSTIC_FLAG_MEMBER, \
|
||||||
RUNTIME_EXPERIMENTAL_FLAG_MEMBER, \
|
RUNTIME_EXPERIMENTAL_FLAG_MEMBER, \
|
||||||
RUNTIME_NOTPRODUCT_FLAG_MEMBER, \
|
RUNTIME_NOTPRODUCT_FLAG_MEMBER, \
|
||||||
RUNTIME_MANAGEABLE_FLAG_MEMBER, \
|
RUNTIME_MANAGEABLE_FLAG_MEMBER, \
|
||||||
@ -110,6 +115,7 @@ typedef enum {
|
|||||||
RUNTIME_PRODUCT_FLAG_MEMBER, \
|
RUNTIME_PRODUCT_FLAG_MEMBER, \
|
||||||
RUNTIME_PD_PRODUCT_FLAG_MEMBER, \
|
RUNTIME_PD_PRODUCT_FLAG_MEMBER, \
|
||||||
RUNTIME_DIAGNOSTIC_FLAG_MEMBER, \
|
RUNTIME_DIAGNOSTIC_FLAG_MEMBER, \
|
||||||
|
RUNTIME_PD_DIAGNOSTIC_FLAG_MEMBER, \
|
||||||
RUNTIME_NOTPRODUCT_FLAG_MEMBER, \
|
RUNTIME_NOTPRODUCT_FLAG_MEMBER, \
|
||||||
IGNORE_RANGE, \
|
IGNORE_RANGE, \
|
||||||
IGNORE_CONSTRAINT, \
|
IGNORE_CONSTRAINT, \
|
||||||
@ -120,6 +126,7 @@ typedef enum {
|
|||||||
RUNTIME_PRODUCT_FLAG_MEMBER, \
|
RUNTIME_PRODUCT_FLAG_MEMBER, \
|
||||||
RUNTIME_PD_PRODUCT_FLAG_MEMBER, \
|
RUNTIME_PD_PRODUCT_FLAG_MEMBER, \
|
||||||
RUNTIME_DIAGNOSTIC_FLAG_MEMBER, \
|
RUNTIME_DIAGNOSTIC_FLAG_MEMBER, \
|
||||||
|
RUNTIME_PD_DIAGNOSTIC_FLAG_MEMBER, \
|
||||||
RUNTIME_EXPERIMENTAL_FLAG_MEMBER, \
|
RUNTIME_EXPERIMENTAL_FLAG_MEMBER, \
|
||||||
RUNTIME_NOTPRODUCT_FLAG_MEMBER, \
|
RUNTIME_NOTPRODUCT_FLAG_MEMBER, \
|
||||||
RUNTIME_MANAGEABLE_FLAG_MEMBER, \
|
RUNTIME_MANAGEABLE_FLAG_MEMBER, \
|
||||||
@ -134,6 +141,7 @@ typedef enum {
|
|||||||
JVMCI_PRODUCT_FLAG_MEMBER, \
|
JVMCI_PRODUCT_FLAG_MEMBER, \
|
||||||
JVMCI_PD_PRODUCT_FLAG_MEMBER, \
|
JVMCI_PD_PRODUCT_FLAG_MEMBER, \
|
||||||
JVMCI_DIAGNOSTIC_FLAG_MEMBER, \
|
JVMCI_DIAGNOSTIC_FLAG_MEMBER, \
|
||||||
|
JVMCI_PD_DIAGNOSTIC_FLAG_MEMBER, \
|
||||||
JVMCI_EXPERIMENTAL_FLAG_MEMBER, \
|
JVMCI_EXPERIMENTAL_FLAG_MEMBER, \
|
||||||
JVMCI_NOTPRODUCT_FLAG_MEMBER, \
|
JVMCI_NOTPRODUCT_FLAG_MEMBER, \
|
||||||
IGNORE_RANGE, \
|
IGNORE_RANGE, \
|
||||||
@ -146,6 +154,7 @@ typedef enum {
|
|||||||
C1_PRODUCT_FLAG_MEMBER, \
|
C1_PRODUCT_FLAG_MEMBER, \
|
||||||
C1_PD_PRODUCT_FLAG_MEMBER, \
|
C1_PD_PRODUCT_FLAG_MEMBER, \
|
||||||
C1_DIAGNOSTIC_FLAG_MEMBER, \
|
C1_DIAGNOSTIC_FLAG_MEMBER, \
|
||||||
|
C1_PD_DIAGNOSTIC_FLAG_MEMBER, \
|
||||||
C1_NOTPRODUCT_FLAG_MEMBER, \
|
C1_NOTPRODUCT_FLAG_MEMBER, \
|
||||||
IGNORE_RANGE, \
|
IGNORE_RANGE, \
|
||||||
IGNORE_CONSTRAINT, \
|
IGNORE_CONSTRAINT, \
|
||||||
@ -157,6 +166,7 @@ typedef enum {
|
|||||||
C2_PRODUCT_FLAG_MEMBER, \
|
C2_PRODUCT_FLAG_MEMBER, \
|
||||||
C2_PD_PRODUCT_FLAG_MEMBER, \
|
C2_PD_PRODUCT_FLAG_MEMBER, \
|
||||||
C2_DIAGNOSTIC_FLAG_MEMBER, \
|
C2_DIAGNOSTIC_FLAG_MEMBER, \
|
||||||
|
C2_PD_DIAGNOSTIC_FLAG_MEMBER, \
|
||||||
C2_EXPERIMENTAL_FLAG_MEMBER, \
|
C2_EXPERIMENTAL_FLAG_MEMBER, \
|
||||||
C2_NOTPRODUCT_FLAG_MEMBER, \
|
C2_NOTPRODUCT_FLAG_MEMBER, \
|
||||||
IGNORE_RANGE, \
|
IGNORE_RANGE, \
|
||||||
@ -182,6 +192,7 @@ typedef enum {
|
|||||||
#define RUNTIME_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
#define RUNTIME_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
||||||
#define RUNTIME_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
#define RUNTIME_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
||||||
#define RUNTIME_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
#define RUNTIME_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
||||||
|
#define RUNTIME_PD_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE(type, name, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
||||||
#define RUNTIME_EXPERIMENTAL_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
#define RUNTIME_EXPERIMENTAL_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
||||||
#define RUNTIME_MANAGEABLE_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
#define RUNTIME_MANAGEABLE_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
||||||
#define RUNTIME_PRODUCT_RW_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
#define RUNTIME_PRODUCT_RW_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
||||||
@ -194,12 +205,14 @@ typedef enum {
|
|||||||
#define JVMCI_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
#define JVMCI_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
||||||
#define JVMCI_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
#define JVMCI_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
||||||
#define JVMCI_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
#define JVMCI_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
||||||
|
#define JVMCI_PD_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE(type, name, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
||||||
#define JVMCI_EXPERIMENTAL_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
#define JVMCI_EXPERIMENTAL_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
||||||
#define JVMCI_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
#define JVMCI_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
||||||
|
|
||||||
#define C1_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
#define C1_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
||||||
#define C1_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
#define C1_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
||||||
#define C1_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
#define C1_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
||||||
|
#define C1_PD_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE(type, name, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
||||||
#define C1_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
#define C1_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
||||||
#define C1_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
#define C1_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
||||||
#define C1_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
#define C1_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
||||||
@ -213,6 +226,7 @@ typedef enum {
|
|||||||
#define C2_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
#define C2_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
||||||
#define C2_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
#define C2_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
||||||
#define C2_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
#define C2_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
||||||
|
#define C2_PD_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE(type, name, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
||||||
#define C2_EXPERIMENTAL_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
#define C2_EXPERIMENTAL_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
||||||
#define C2_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
#define C2_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
||||||
#define C2_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
#define C2_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, doc) FLAG_MEMBER_WITH_TYPE(name,type),
|
||||||
@ -230,6 +244,7 @@ typedef enum {
|
|||||||
RUNTIME_PRODUCT_FLAG_MEMBER_WITH_TYPE,
|
RUNTIME_PRODUCT_FLAG_MEMBER_WITH_TYPE,
|
||||||
RUNTIME_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE,
|
RUNTIME_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE,
|
||||||
RUNTIME_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
|
RUNTIME_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
|
||||||
|
RUNTIME_PD_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
|
||||||
RUNTIME_EXPERIMENTAL_FLAG_MEMBER_WITH_TYPE,
|
RUNTIME_EXPERIMENTAL_FLAG_MEMBER_WITH_TYPE,
|
||||||
RUNTIME_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE,
|
RUNTIME_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE,
|
||||||
RUNTIME_MANAGEABLE_FLAG_MEMBER_WITH_TYPE,
|
RUNTIME_MANAGEABLE_FLAG_MEMBER_WITH_TYPE,
|
||||||
@ -243,6 +258,7 @@ typedef enum {
|
|||||||
RUNTIME_PRODUCT_FLAG_MEMBER_WITH_TYPE,
|
RUNTIME_PRODUCT_FLAG_MEMBER_WITH_TYPE,
|
||||||
RUNTIME_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE,
|
RUNTIME_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE,
|
||||||
RUNTIME_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
|
RUNTIME_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
|
||||||
|
RUNTIME_PD_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
|
||||||
RUNTIME_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE,
|
RUNTIME_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE,
|
||||||
IGNORE_RANGE,
|
IGNORE_RANGE,
|
||||||
IGNORE_CONSTRAINT,
|
IGNORE_CONSTRAINT,
|
||||||
@ -253,6 +269,7 @@ typedef enum {
|
|||||||
RUNTIME_PRODUCT_FLAG_MEMBER_WITH_TYPE,
|
RUNTIME_PRODUCT_FLAG_MEMBER_WITH_TYPE,
|
||||||
RUNTIME_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE,
|
RUNTIME_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE,
|
||||||
RUNTIME_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
|
RUNTIME_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
|
||||||
|
RUNTIME_PD_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
|
||||||
RUNTIME_EXPERIMENTAL_FLAG_MEMBER_WITH_TYPE,
|
RUNTIME_EXPERIMENTAL_FLAG_MEMBER_WITH_TYPE,
|
||||||
RUNTIME_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE,
|
RUNTIME_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE,
|
||||||
RUNTIME_MANAGEABLE_FLAG_MEMBER_WITH_TYPE,
|
RUNTIME_MANAGEABLE_FLAG_MEMBER_WITH_TYPE,
|
||||||
@ -267,6 +284,7 @@ typedef enum {
|
|||||||
JVMCI_PRODUCT_FLAG_MEMBER_WITH_TYPE,
|
JVMCI_PRODUCT_FLAG_MEMBER_WITH_TYPE,
|
||||||
JVMCI_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE,
|
JVMCI_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE,
|
||||||
JVMCI_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
|
JVMCI_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
|
||||||
|
JVMCI_PD_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
|
||||||
JVMCI_EXPERIMENTAL_FLAG_MEMBER_WITH_TYPE,
|
JVMCI_EXPERIMENTAL_FLAG_MEMBER_WITH_TYPE,
|
||||||
JVMCI_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE,
|
JVMCI_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE,
|
||||||
IGNORE_RANGE,
|
IGNORE_RANGE,
|
||||||
@ -279,6 +297,7 @@ typedef enum {
|
|||||||
C1_PRODUCT_FLAG_MEMBER_WITH_TYPE,
|
C1_PRODUCT_FLAG_MEMBER_WITH_TYPE,
|
||||||
C1_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE,
|
C1_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE,
|
||||||
C1_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
|
C1_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
|
||||||
|
C1_PD_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
|
||||||
C1_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE,
|
C1_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE,
|
||||||
IGNORE_RANGE,
|
IGNORE_RANGE,
|
||||||
IGNORE_CONSTRAINT,
|
IGNORE_CONSTRAINT,
|
||||||
@ -290,6 +309,7 @@ typedef enum {
|
|||||||
C2_PRODUCT_FLAG_MEMBER_WITH_TYPE,
|
C2_PRODUCT_FLAG_MEMBER_WITH_TYPE,
|
||||||
C2_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE,
|
C2_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE,
|
||||||
C2_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
|
C2_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
|
||||||
|
C2_PD_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
|
||||||
C2_EXPERIMENTAL_FLAG_MEMBER_WITH_TYPE,
|
C2_EXPERIMENTAL_FLAG_MEMBER_WITH_TYPE,
|
||||||
C2_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE,
|
C2_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE,
|
||||||
IGNORE_RANGE,
|
IGNORE_RANGE,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright 2008, 2009, 2010 Red Hat, Inc.
|
* Copyright 2008, 2009, 2010 Red Hat, Inc.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
@ -31,7 +31,7 @@
|
|||||||
# include "shark_globals_zero.hpp"
|
# include "shark_globals_zero.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define SHARK_FLAGS(develop, develop_pd, product, product_pd, diagnostic, notproduct) \
|
#define SHARK_FLAGS(develop, develop_pd, product, product_pd, diagnostic, diagnostic_pd, notproduct) \
|
||||||
\
|
\
|
||||||
product(intx, MaxNodeLimit, 65000, \
|
product(intx, MaxNodeLimit, 65000, \
|
||||||
"Maximum number of nodes") \
|
"Maximum number of nodes") \
|
||||||
@ -69,6 +69,7 @@
|
|||||||
"Runs LLVM verify over LLVM IR") \
|
"Runs LLVM verify over LLVM IR") \
|
||||||
|
|
||||||
|
|
||||||
SHARK_FLAGS(DECLARE_DEVELOPER_FLAG, DECLARE_PD_DEVELOPER_FLAG, DECLARE_PRODUCT_FLAG, DECLARE_PD_PRODUCT_FLAG, DECLARE_DIAGNOSTIC_FLAG, DECLARE_NOTPRODUCT_FLAG)
|
SHARK_FLAGS(DECLARE_DEVELOPER_FLAG, DECLARE_PD_DEVELOPER_FLAG, DECLARE_PRODUCT_FLAG, DECLARE_PD_PRODUCT_FLAG, DECLARE_DIAGNOSTIC_FLAG, DECLARE_PD_DIAGNOSTIC_FLAG,
|
||||||
|
DECLARE_NOTPRODUCT_FLAG)
|
||||||
|
|
||||||
#endif // SHARE_VM_SHARK_SHARK_GLOBALS_HPP
|
#endif // SHARE_VM_SHARK_SHARK_GLOBALS_HPP
|
||||||
|
@ -366,3 +366,4 @@ b9a518bf72516954e57ac2f6e3ef21e13008f1cd jdk-9+120
|
|||||||
ee29aaab5889555ea56e4c0ed690aabb7613529d jdk-9+121
|
ee29aaab5889555ea56e4c0ed690aabb7613529d jdk-9+121
|
||||||
981ae344923f09c46d8d1d5a3ed9fa71deafe0c6 jdk-9+122
|
981ae344923f09c46d8d1d5a3ed9fa71deafe0c6 jdk-9+122
|
||||||
c40c8739bcdc88892ff58ebee3fd8a3f287be94d jdk-9+123
|
c40c8739bcdc88892ff58ebee3fd8a3f287be94d jdk-9+123
|
||||||
|
7ff61c55b5c6c124592f09b18953222009a204a6 jdk-9+124
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -23,10 +23,10 @@
|
|||||||
* questions.
|
* questions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <dlfcn.h>
|
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
|
#include <objc/objc-runtime.h>
|
||||||
|
|
||||||
#include <Security/AuthSession.h>
|
#include <Security/AuthSession.h>
|
||||||
#include <CoreFoundation/CoreFoundation.h>
|
#include <CoreFoundation/CoreFoundation.h>
|
||||||
@ -35,18 +35,6 @@
|
|||||||
|
|
||||||
#include "java_props_macosx.h"
|
#include "java_props_macosx.h"
|
||||||
|
|
||||||
// need dlopen/dlsym trick to avoid pulling in JavaRuntimeSupport before libjava.dylib is loaded
|
|
||||||
static void *getJRSFramework() {
|
|
||||||
static void *jrsFwk = NULL;
|
|
||||||
#ifndef STATIC_BUILD
|
|
||||||
// JavaRuntimeSupport doesn't support static Java runtimes
|
|
||||||
if (jrsFwk == NULL) {
|
|
||||||
jrsFwk = dlopen("/System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/JavaRuntimeSupport", RTLD_LAZY | RTLD_LOCAL);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return jrsFwk;
|
|
||||||
}
|
|
||||||
|
|
||||||
char *getPosixLocale(int cat) {
|
char *getPosixLocale(int cat) {
|
||||||
char *lc = setlocale(cat, NULL);
|
char *lc = setlocale(cat, NULL);
|
||||||
if ((lc == NULL) || (strcmp(lc, "C") == 0)) {
|
if ((lc == NULL) || (strcmp(lc, "C") == 0)) {
|
||||||
@ -61,18 +49,70 @@ char *getMacOSXLocale(int cat) {
|
|||||||
switch (cat) {
|
switch (cat) {
|
||||||
case LC_MESSAGES:
|
case LC_MESSAGES:
|
||||||
{
|
{
|
||||||
void *jrsFwk = getJRSFramework();
|
// get preferred language code
|
||||||
if (jrsFwk == NULL) return NULL;
|
CFArrayRef languages = CFLocaleCopyPreferredLanguages();
|
||||||
|
if (languages == NULL) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
if (CFArrayGetCount(languages) <= 0) {
|
||||||
|
CFRelease(languages);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
char *(*JRSCopyPrimaryLanguage)() = dlsym(jrsFwk, "JRSCopyPrimaryLanguage");
|
CFStringRef primaryLanguage = (CFStringRef)CFArrayGetValueAtIndex(languages, 0);
|
||||||
char *primaryLanguage = JRSCopyPrimaryLanguage ? JRSCopyPrimaryLanguage() : NULL;
|
if (primaryLanguage == NULL) {
|
||||||
if (primaryLanguage == NULL) return NULL;
|
CFRelease(languages);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
char languageString[LOCALEIDLENGTH];
|
||||||
|
if (CFStringGetCString(primaryLanguage, languageString,
|
||||||
|
LOCALEIDLENGTH, CFStringGetSystemEncoding()) == false) {
|
||||||
|
CFRelease(languages);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
CFRelease(languages);
|
||||||
|
|
||||||
char *(*JRSCopyCanonicalLanguageForPrimaryLanguage)(char *) = dlsym(jrsFwk, "JRSCopyCanonicalLanguageForPrimaryLanguage");
|
// Language IDs use the language designators and (optional) region
|
||||||
char *canonicalLanguage = JRSCopyCanonicalLanguageForPrimaryLanguage ? JRSCopyCanonicalLanguageForPrimaryLanguage(primaryLanguage) : NULL;
|
// and script designators of BCP 47. So possible formats are:
|
||||||
free (primaryLanguage);
|
//
|
||||||
|
// "en" (language designator only)
|
||||||
|
// "haw" (3-letter lanuage designator)
|
||||||
|
// "en-GB" (language with alpha-2 region designator)
|
||||||
|
// "es-419" (language with 3-digit UN M.49 area code)
|
||||||
|
// "zh-Hans" (language with ISO 15924 script designator)
|
||||||
|
//
|
||||||
|
// In the case of region designators (alpha-2 or UN M.49), we convert
|
||||||
|
// to our locale string format by changing '-' to '_'. That is, if
|
||||||
|
// the '-' is followed by fewer than 4 chars.
|
||||||
|
char* scriptOrRegion = strchr(languageString, '-');
|
||||||
|
if (scriptOrRegion != NULL && strlen(scriptOrRegion) < 5) {
|
||||||
|
*scriptOrRegion = '_';
|
||||||
|
|
||||||
return canonicalLanguage;
|
assert((strlen(scriptOrRegion) == 3 &&
|
||||||
|
// '-' followed by a 2 character region designator
|
||||||
|
isalpha(scriptOrRegion[1]) &&
|
||||||
|
isalpha(scriptOrRegion[2])) ||
|
||||||
|
(strlen(scriptOrRegion) == 4 &&
|
||||||
|
// '-' followed by a 3-digit UN M.49 area code
|
||||||
|
isdigit(scriptOrRegion[1]) &&
|
||||||
|
isdigit(scriptOrRegion[2]) &&
|
||||||
|
isdigit(scriptOrRegion[3])));
|
||||||
|
}
|
||||||
|
const char* retVal = languageString;
|
||||||
|
|
||||||
|
// Special case for Portuguese in Brazil:
|
||||||
|
// The language code needs the "_BR" region code (to distinguish it
|
||||||
|
// from Portuguese in Portugal), but this is missing when using the
|
||||||
|
// "Portuguese (Brazil)" language.
|
||||||
|
// If language is "pt" and the current locale is pt_BR, return pt_BR.
|
||||||
|
char localeString[LOCALEIDLENGTH];
|
||||||
|
if (strcmp(retVal, "pt") == 0 &&
|
||||||
|
CFStringGetCString(CFLocaleGetIdentifier(CFLocaleCopyCurrent()),
|
||||||
|
localeString, LOCALEIDLENGTH, CFStringGetSystemEncoding()) &&
|
||||||
|
strcmp(localeString, "pt_BR") == 0) {
|
||||||
|
retVal = localeString;
|
||||||
|
}
|
||||||
|
return strdup(retVal);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -92,14 +132,6 @@ char *getMacOSXLocale(int cat) {
|
|||||||
char *setupMacOSXLocale(int cat) {
|
char *setupMacOSXLocale(int cat) {
|
||||||
char * ret = getMacOSXLocale(cat);
|
char * ret = getMacOSXLocale(cat);
|
||||||
|
|
||||||
if (cat == LC_MESSAGES && ret != NULL) {
|
|
||||||
void *jrsFwk = getJRSFramework();
|
|
||||||
if (jrsFwk != NULL) {
|
|
||||||
void (*JRSSetDefaultLocalization)(char *) = dlsym(jrsFwk, "JRSSetDefaultLocalization");
|
|
||||||
if (JRSSetDefaultLocalization) JRSSetDefaultLocalization(ret);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ret == NULL) {
|
if (ret == NULL) {
|
||||||
return getPosixLocale(cat);
|
return getPosixLocale(cat);
|
||||||
} else {
|
} else {
|
||||||
@ -126,22 +158,35 @@ int isInAquaSession() {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 10.9 SDK does not include the NSOperatingSystemVersion struct.
|
||||||
|
// For now, create our own
|
||||||
|
typedef struct {
|
||||||
|
NSInteger majorVersion;
|
||||||
|
NSInteger minorVersion;
|
||||||
|
NSInteger patchVersion;
|
||||||
|
} OSVerStruct;
|
||||||
|
|
||||||
void setOSNameAndVersion(java_props_t *sprops) {
|
void setOSNameAndVersion(java_props_t *sprops) {
|
||||||
/* Don't rely on JRSCopyOSName because there's no guarantee the value will
|
// Hardcode os_name, and fill in os_version
|
||||||
* remain the same, or even if the JRS functions will continue to be part of
|
|
||||||
* Mac OS X. So hardcode os_name, and fill in os_version if we can.
|
|
||||||
*/
|
|
||||||
sprops->os_name = strdup("Mac OS X");
|
sprops->os_name = strdup("Mac OS X");
|
||||||
|
|
||||||
void *jrsFwk = getJRSFramework();
|
char* osVersionCStr = NULL;
|
||||||
if (jrsFwk != NULL) {
|
// Mac OS 10.9 includes the [NSProcessInfo operatingSystemVersion] function,
|
||||||
char *(*copyOSVersion)() = dlsym(jrsFwk, "JRSCopyOSVersion");
|
// but it's not in the 10.9 SDK. So, call it via objc_msgSend_stret.
|
||||||
if (copyOSVersion != NULL) {
|
if ([[NSProcessInfo processInfo] respondsToSelector:@selector(operatingSystemVersion)]) {
|
||||||
sprops->os_version = copyOSVersion();
|
OSVerStruct (*procInfoFn)(id rec, SEL sel) = (OSVerStruct(*)(id, SEL))objc_msgSend_stret;
|
||||||
return;
|
OSVerStruct osVer = procInfoFn([NSProcessInfo processInfo],
|
||||||
}
|
@selector(operatingSystemVersion));
|
||||||
|
NSString *nsVerStr = [NSString stringWithFormat:@"%ld.%ld.%ld",
|
||||||
|
(long)osVer.majorVersion, (long)osVer.minorVersion, (long)osVer.patchVersion];
|
||||||
|
// Copy out the char*
|
||||||
|
osVersionCStr = strdup([nsVerStr UTF8String]);
|
||||||
}
|
}
|
||||||
sprops->os_version = strdup("Unknown");
|
|
||||||
|
if (osVersionCStr == NULL) {
|
||||||
|
osVersionCStr = strdup("Unknown");
|
||||||
|
}
|
||||||
|
sprops->os_version = osVersionCStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1994, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -359,10 +359,10 @@ class BufferedInputStream extends FilterInputStream {
|
|||||||
* See the general contract of the <code>skip</code>
|
* See the general contract of the <code>skip</code>
|
||||||
* method of <code>InputStream</code>.
|
* method of <code>InputStream</code>.
|
||||||
*
|
*
|
||||||
* @exception IOException if the stream does not support seek,
|
* @throws IOException if this input stream has been closed by
|
||||||
* or if this input stream has been closed by
|
* invoking its {@link #close()} method,
|
||||||
* invoking its {@link #close()} method, or an
|
* {@code in.skip(n)} throws an IOException,
|
||||||
* I/O error occurs.
|
* or an I/O error occurs.
|
||||||
*/
|
*/
|
||||||
public synchronized long skip(long n) throws IOException {
|
public synchronized long skip(long n) throws IOException {
|
||||||
getBufIfOpen(); // Check for closed stream
|
getBufIfOpen(); // Check for closed stream
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1994, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -144,8 +144,7 @@ class FilterInputStream extends InputStream {
|
|||||||
*
|
*
|
||||||
* @param n the number of bytes to be skipped.
|
* @param n the number of bytes to be skipped.
|
||||||
* @return the actual number of bytes skipped.
|
* @return the actual number of bytes skipped.
|
||||||
* @exception IOException if the stream does not support seek,
|
* @throws IOException if {@code in.skip(n)} throws an IOException.
|
||||||
* or if some other I/O error occurs.
|
|
||||||
*/
|
*/
|
||||||
public long skip(long n) throws IOException {
|
public long skip(long n) throws IOException {
|
||||||
return in.skip(n);
|
return in.skip(n);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1994, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -325,7 +325,7 @@ public abstract class InputStream implements Closeable {
|
|||||||
* returns 0, and no bytes are skipped. Subclasses may handle the negative
|
* returns 0, and no bytes are skipped. Subclasses may handle the negative
|
||||||
* value differently.
|
* value differently.
|
||||||
*
|
*
|
||||||
* <p> The <code>skip</code> method of this class creates a
|
* <p> The <code>skip</code> method implementation of this class creates a
|
||||||
* byte array and then repeatedly reads into it until <code>n</code> bytes
|
* byte array and then repeatedly reads into it until <code>n</code> bytes
|
||||||
* have been read or the end of the stream has been reached. Subclasses are
|
* have been read or the end of the stream has been reached. Subclasses are
|
||||||
* encouraged to provide a more efficient implementation of this method.
|
* encouraged to provide a more efficient implementation of this method.
|
||||||
@ -333,8 +333,7 @@ public abstract class InputStream implements Closeable {
|
|||||||
*
|
*
|
||||||
* @param n the number of bytes to be skipped.
|
* @param n the number of bytes to be skipped.
|
||||||
* @return the actual number of bytes skipped.
|
* @return the actual number of bytes skipped.
|
||||||
* @exception IOException if the stream does not support seek,
|
* @throws IOException if an I/O error occurs.
|
||||||
* or if some other I/O error occurs.
|
|
||||||
*/
|
*/
|
||||||
public long skip(long n) throws IOException {
|
public long skip(long n) throws IOException {
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1994, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -291,10 +291,10 @@ class PushbackInputStream extends FilterInputStream {
|
|||||||
*
|
*
|
||||||
* @param n {@inheritDoc}
|
* @param n {@inheritDoc}
|
||||||
* @return {@inheritDoc}
|
* @return {@inheritDoc}
|
||||||
* @exception IOException if the stream does not support seek,
|
* @throws IOException if the stream has been closed by
|
||||||
* or the stream has been closed by
|
* invoking its {@link #close()} method,
|
||||||
* invoking its {@link #close()} method,
|
* {@code in.skip(n)} throws an IOException,
|
||||||
* or an I/O error occurs.
|
* or an I/O error occurs.
|
||||||
* @see java.io.FilterInputStream#in
|
* @see java.io.FilterInputStream#in
|
||||||
* @see java.io.InputStream#skip(long n)
|
* @see java.io.InputStream#skip(long n)
|
||||||
* @since 1.2
|
* @since 1.2
|
||||||
|
@ -102,9 +102,13 @@ class ApplicationShutdownHooks {
|
|||||||
hook.start();
|
hook.start();
|
||||||
}
|
}
|
||||||
for (Thread hook : threads) {
|
for (Thread hook : threads) {
|
||||||
try {
|
while (true) {
|
||||||
hook.join();
|
try {
|
||||||
} catch (InterruptedException x) { }
|
hook.join();
|
||||||
|
break;
|
||||||
|
} catch (InterruptedException ignored) {
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -259,17 +259,7 @@ final class StringUTF16 {
|
|||||||
|
|
||||||
@HotSpotIntrinsicCandidate
|
@HotSpotIntrinsicCandidate
|
||||||
public static int compareToLatin1(byte[] value, byte[] other) {
|
public static int compareToLatin1(byte[] value, byte[] other) {
|
||||||
int len1 = length(value);
|
return -StringLatin1.compareToUTF16(other, value);
|
||||||
int len2 = StringLatin1.length(other);
|
|
||||||
int lim = Math.min(len1, len2);
|
|
||||||
for (int k = 0; k < lim; k++) {
|
|
||||||
char c1 = getChar(value, k);
|
|
||||||
char c2 = StringLatin1.getChar(other, k);
|
|
||||||
if (c1 != c2) {
|
|
||||||
return c1 - c2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return len1 - len2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int compareToCI(byte[] value, byte[] other) {
|
public static int compareToCI(byte[] value, byte[] other) {
|
||||||
@ -295,25 +285,7 @@ final class StringUTF16 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static int compareToCI_Latin1(byte[] value, byte[] other) {
|
public static int compareToCI_Latin1(byte[] value, byte[] other) {
|
||||||
int len1 = length(value);
|
return -StringLatin1.compareToCI_UTF16(other, value);
|
||||||
int len2 = StringLatin1.length(other);
|
|
||||||
int lim = Math.min(len1, len2);
|
|
||||||
for (int k = 0; k < lim; k++) {
|
|
||||||
char c1 = getChar(value, k);
|
|
||||||
char c2 = StringLatin1.getChar(other, k);
|
|
||||||
if (c1 != c2) {
|
|
||||||
c1 = Character.toUpperCase(c1);
|
|
||||||
c2 = Character.toUpperCase(c2);
|
|
||||||
if (c1 != c2) {
|
|
||||||
c1 = Character.toLowerCase(c1);
|
|
||||||
c2 = Character.toLowerCase(c2);
|
|
||||||
if (c1 != c2) {
|
|
||||||
return c1 - c2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return len1 - len2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int hashCode(byte[] value) {
|
public static int hashCode(byte[] value) {
|
||||||
@ -566,24 +538,7 @@ final class StringUTF16 {
|
|||||||
public static boolean regionMatchesCI_Latin1(byte[] value, int toffset,
|
public static boolean regionMatchesCI_Latin1(byte[] value, int toffset,
|
||||||
byte[] other, int ooffset,
|
byte[] other, int ooffset,
|
||||||
int len) {
|
int len) {
|
||||||
int last = toffset + len;
|
return StringLatin1.regionMatchesCI_UTF16(other, ooffset, value, toffset, len);
|
||||||
while (toffset < last) {
|
|
||||||
char c1 = getChar(value, toffset++);
|
|
||||||
char c2 = (char)(other[ooffset++] & 0xff);
|
|
||||||
if (c1 == c2) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
char u1 = Character.toUpperCase(c1);
|
|
||||||
char u2 = Character.toUpperCase(c2);
|
|
||||||
if (u1 == u2) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (Character.toLowerCase(u1) == Character.toLowerCase(u2)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String toLowerCase(String str, byte[] value, Locale locale) {
|
public static String toLowerCase(String str, byte[] value, Locale locale) {
|
||||||
|
@ -300,8 +300,9 @@ class MulticastSocket extends DatagramSocket {
|
|||||||
*
|
*
|
||||||
* @param mcastaddr is the multicast address to join
|
* @param mcastaddr is the multicast address to join
|
||||||
*
|
*
|
||||||
* @exception IOException if there is an error joining
|
* @exception IOException if there is an error joining, or when the address
|
||||||
* or when the address is not a multicast address.
|
* is not a multicast address, or the platform does not support
|
||||||
|
* multicasting
|
||||||
* @exception SecurityException if a security manager exists and its
|
* @exception SecurityException if a security manager exists and its
|
||||||
* {@code checkMulticast} method doesn't allow the join.
|
* {@code checkMulticast} method doesn't allow the join.
|
||||||
*
|
*
|
||||||
@ -384,8 +385,9 @@ class MulticastSocket extends DatagramSocket {
|
|||||||
* {@link MulticastSocket#setInterface(InetAddress)} or
|
* {@link MulticastSocket#setInterface(InetAddress)} or
|
||||||
* {@link MulticastSocket#setNetworkInterface(NetworkInterface)}
|
* {@link MulticastSocket#setNetworkInterface(NetworkInterface)}
|
||||||
*
|
*
|
||||||
* @exception IOException if there is an error joining
|
* @exception IOException if there is an error joining, or when the address
|
||||||
* or when the address is not a multicast address.
|
* is not a multicast address, or the platform does not support
|
||||||
|
* multicasting
|
||||||
* @exception SecurityException if a security manager exists and its
|
* @exception SecurityException if a security manager exists and its
|
||||||
* {@code checkMulticast} method doesn't allow the join.
|
* {@code checkMulticast} method doesn't allow the join.
|
||||||
* @throws IllegalArgumentException if mcastaddr is null or is a
|
* @throws IllegalArgumentException if mcastaddr is null or is a
|
||||||
|
@ -265,8 +265,14 @@ public final class URLPermission extends Permission {
|
|||||||
|
|
||||||
URLPermission that = (URLPermission)p;
|
URLPermission that = (URLPermission)p;
|
||||||
|
|
||||||
if (!this.methods.get(0).equals("*") &&
|
if (this.methods.isEmpty() && !that.methods.isEmpty()) {
|
||||||
Collections.indexOfSubList(this.methods, that.methods) == -1) {
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!this.methods.isEmpty() &&
|
||||||
|
!this.methods.get(0).equals("*") &&
|
||||||
|
Collections.indexOfSubList(this.methods,
|
||||||
|
that.methods) == -1) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -455,15 +461,11 @@ public final class URLPermission extends Permission {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String actions() {
|
private String actions() {
|
||||||
StringBuilder b = new StringBuilder();
|
String b = String.join(",", methods);
|
||||||
for (String s : methods) {
|
if (!requestHeaders.isEmpty()) {
|
||||||
b.append(s);
|
b += ":" + String.join(",", requestHeaders);
|
||||||
}
|
}
|
||||||
b.append(":");
|
return b;
|
||||||
for (String s : requestHeaders) {
|
|
||||||
b.append(s);
|
|
||||||
}
|
|
||||||
return b.toString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -40,10 +40,11 @@ import java.net.StandardSocketOptions; // javadoc
|
|||||||
* address.
|
* address.
|
||||||
*
|
*
|
||||||
* <p> In the case of a channel to an {@link StandardProtocolFamily#INET IPv4} socket,
|
* <p> In the case of a channel to an {@link StandardProtocolFamily#INET IPv4} socket,
|
||||||
* the underlying operating system supports <a href="http://www.ietf.org/rfc/rfc2236.txt">
|
* the underlying operating system optionally supports
|
||||||
* <i>RFC 2236: Internet Group Management Protocol, Version 2 (IGMPv2)</i></a>.
|
* <a href="http://www.ietf.org/rfc/rfc2236.txt"> <i>RFC 2236: Internet Group
|
||||||
* It may optionally support source filtering as specified by <a
|
* Management Protocol, Version 2 (IGMPv2)</i></a>. When IGMPv2 is supported then
|
||||||
* href="http://www.ietf.org/rfc/rfc3376.txt"> <i>RFC 3376: Internet Group
|
* the operating system may additionally support source filtering as specified by
|
||||||
|
* <a href="http://www.ietf.org/rfc/rfc3376.txt"> <i>RFC 3376: Internet Group
|
||||||
* Management Protocol, Version 3 (IGMPv3)</i></a>.
|
* Management Protocol, Version 3 (IGMPv3)</i></a>.
|
||||||
* For channels to an {@link StandardProtocolFamily#INET6 IPv6} socket, the equivalent
|
* For channels to an {@link StandardProtocolFamily#INET6 IPv6} socket, the equivalent
|
||||||
* standards are <a href="http://www.ietf.org/rfc/rfc2710.txt"> <i>RFC 2710:
|
* standards are <a href="http://www.ietf.org/rfc/rfc2710.txt"> <i>RFC 2710:
|
||||||
@ -167,7 +168,8 @@ public interface MulticastChannel
|
|||||||
* If the channel already has source-specific membership of the
|
* If the channel already has source-specific membership of the
|
||||||
* group on the interface
|
* group on the interface
|
||||||
* @throws UnsupportedOperationException
|
* @throws UnsupportedOperationException
|
||||||
* If the channel's socket is not an Internet Protocol socket
|
* If the channel's socket is not an Internet Protocol socket, or
|
||||||
|
* the platform does not support multicasting
|
||||||
* @throws ClosedChannelException
|
* @throws ClosedChannelException
|
||||||
* If this channel is closed
|
* If this channel is closed
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
@ -214,8 +216,9 @@ public interface MulticastChannel
|
|||||||
* If the channel is currently a member of the group on the given
|
* If the channel is currently a member of the group on the given
|
||||||
* interface to receive all datagrams
|
* interface to receive all datagrams
|
||||||
* @throws UnsupportedOperationException
|
* @throws UnsupportedOperationException
|
||||||
* If the channel's socket is not an Internet Protocol socket or
|
* If the channel's socket is not an Internet Protocol socket, or
|
||||||
* source filtering is not supported
|
* source filtering is not supported, or the platform does not
|
||||||
|
* support multicasting
|
||||||
* @throws ClosedChannelException
|
* @throws ClosedChannelException
|
||||||
* If this channel is closed
|
* If this channel is closed
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
|
@ -3895,8 +3895,7 @@ public final class Formatter implements Closeable, Flushable {
|
|||||||
TimeZone tz = t.getTimeZone();
|
TimeZone tz = t.getTimeZone();
|
||||||
sb.append(tz.getDisplayName((t.get(Calendar.DST_OFFSET) != 0),
|
sb.append(tz.getDisplayName((t.get(Calendar.DST_OFFSET) != 0),
|
||||||
TimeZone.SHORT,
|
TimeZone.SHORT,
|
||||||
Objects.requireNonNullElse(l,
|
Objects.requireNonNullElse(l, Locale.US)));
|
||||||
Locale.getDefault(Locale.Category.FORMAT))));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3904,8 +3903,7 @@ public final class Formatter implements Closeable, Flushable {
|
|||||||
case DateTime.NAME_OF_DAY_ABBREV: // 'a'
|
case DateTime.NAME_OF_DAY_ABBREV: // 'a'
|
||||||
case DateTime.NAME_OF_DAY: { // 'A'
|
case DateTime.NAME_OF_DAY: { // 'A'
|
||||||
int i = t.get(Calendar.DAY_OF_WEEK);
|
int i = t.get(Calendar.DAY_OF_WEEK);
|
||||||
Locale lt = Objects.requireNonNullElse(l,
|
Locale lt = Objects.requireNonNullElse(l, Locale.US);
|
||||||
Locale.getDefault(Locale.Category.FORMAT));
|
|
||||||
DateFormatSymbols dfs = DateFormatSymbols.getInstance(lt);
|
DateFormatSymbols dfs = DateFormatSymbols.getInstance(lt);
|
||||||
if (c == DateTime.NAME_OF_DAY)
|
if (c == DateTime.NAME_OF_DAY)
|
||||||
sb.append(dfs.getWeekdays()[i]);
|
sb.append(dfs.getWeekdays()[i]);
|
||||||
@ -3917,8 +3915,7 @@ public final class Formatter implements Closeable, Flushable {
|
|||||||
case DateTime.NAME_OF_MONTH_ABBREV_X: // 'h' -- same b
|
case DateTime.NAME_OF_MONTH_ABBREV_X: // 'h' -- same b
|
||||||
case DateTime.NAME_OF_MONTH: { // 'B'
|
case DateTime.NAME_OF_MONTH: { // 'B'
|
||||||
int i = t.get(Calendar.MONTH);
|
int i = t.get(Calendar.MONTH);
|
||||||
Locale lt = Objects.requireNonNullElse(l,
|
Locale lt = Objects.requireNonNullElse(l, Locale.US);
|
||||||
Locale.getDefault(Locale.Category.FORMAT));
|
|
||||||
DateFormatSymbols dfs = DateFormatSymbols.getInstance(lt);
|
DateFormatSymbols dfs = DateFormatSymbols.getInstance(lt);
|
||||||
if (c == DateTime.NAME_OF_MONTH)
|
if (c == DateTime.NAME_OF_MONTH)
|
||||||
sb.append(dfs.getMonths()[i]);
|
sb.append(dfs.getMonths()[i]);
|
||||||
|
@ -925,7 +925,6 @@ public final class Scanner implements Iterator<String>, Closeable {
|
|||||||
needInput = true;
|
needInput = true;
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Must look for next delims. Simply attempting to match the
|
// Must look for next delims. Simply attempting to match the
|
||||||
// pattern at this point may find a match but it might not be
|
// pattern at this point may find a match but it might not be
|
||||||
// the first longest match because of missing input, or it might
|
// the first longest match because of missing input, or it might
|
||||||
@ -941,16 +940,13 @@ public final class Scanner implements Iterator<String>, Closeable {
|
|||||||
foundNextDelim = matcher.find();
|
foundNextDelim = matcher.find();
|
||||||
}
|
}
|
||||||
if (foundNextDelim) {
|
if (foundNextDelim) {
|
||||||
// In two rare cases that more input might cause the match to be
|
// In the rare case that more input could cause the match
|
||||||
// lost or change.
|
// to be lost and there is more input coming we must wait
|
||||||
// (1) if requireEnd() is true, more input might cause the match
|
// for more input. Note that hitting the end is okay as long
|
||||||
// to be lost, we must wait for more input.
|
// as the match cannot go away. It is the beginning of the
|
||||||
// (2) while hitting the end is okay IF the match does not
|
// next delims we want to be sure about, we don't care if
|
||||||
// go away AND the beginning of the next delims does not change
|
// they potentially extend further.
|
||||||
// (we don't care if they potentially extend further). But it's
|
if (matcher.requireEnd() && !sourceClosed) {
|
||||||
// possible that more input could cause the beginning of the
|
|
||||||
// delims change, so have to wait for more input as well.
|
|
||||||
if ((matcher.requireEnd() || matcher.hitEnd()) && !sourceClosed) {
|
|
||||||
needInput = true;
|
needInput = true;
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
package jdk.internal.jrtfs;
|
package jdk.internal.jrtfs;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.io.UncheckedIOException;
|
||||||
import java.nio.file.DirectoryStream;
|
import java.nio.file.DirectoryStream;
|
||||||
import java.nio.file.FileSystem;
|
import java.nio.file.FileSystem;
|
||||||
import java.nio.file.FileSystemException;
|
import java.nio.file.FileSystemException;
|
||||||
@ -138,6 +139,15 @@ class ExplodedImage extends SystemImage {
|
|||||||
}
|
}
|
||||||
return children;
|
return children;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long size() {
|
||||||
|
try {
|
||||||
|
return isDirectory() ? 0 : Files.size(path);
|
||||||
|
} catch (IOException ex) {
|
||||||
|
throw new UncheckedIOException(ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1994, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -165,8 +165,10 @@ public class NetworkClient {
|
|||||||
// server & port will be the proxy address and port
|
// server & port will be the proxy address and port
|
||||||
s = new Socket(Proxy.NO_PROXY);
|
s = new Socket(Proxy.NO_PROXY);
|
||||||
}
|
}
|
||||||
} else
|
} else {
|
||||||
s = createSocket();
|
s = createSocket();
|
||||||
|
}
|
||||||
|
|
||||||
// Instance specific timeouts do have priority, that means
|
// Instance specific timeouts do have priority, that means
|
||||||
// connectTimeout & readTimeout (-1 means not set)
|
// connectTimeout & readTimeout (-1 means not set)
|
||||||
// Then global default timeouts
|
// Then global default timeouts
|
||||||
@ -194,7 +196,7 @@ public class NetworkClient {
|
|||||||
* to create the socket.
|
* to create the socket.
|
||||||
*/
|
*/
|
||||||
protected Socket createSocket() throws IOException {
|
protected Socket createSocket() throws IOException {
|
||||||
return new java.net.Socket();
|
return new java.net.Socket(Proxy.NO_PROXY); // direct connection
|
||||||
}
|
}
|
||||||
|
|
||||||
protected InetAddress getLocalAddress() throws IOException {
|
protected InetAddress getLocalAddress() throws IOException {
|
||||||
|
@ -1,97 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 1996, 1998, 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. Oracle designates this
|
|
||||||
* particular file as subject to the "Classpath" exception as provided
|
|
||||||
* by Oracle in the LICENSE file that accompanied this code.
|
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*-
|
|
||||||
* netdoc urls point either into the local filesystem or externally
|
|
||||||
* through an http url, with network documents being preferred. Useful for
|
|
||||||
* FAQs & other documents which are likely to be changing over time at the
|
|
||||||
* central site, and where the user will want the most recent edition.
|
|
||||||
*
|
|
||||||
* @author Steven B. Byrne
|
|
||||||
*/
|
|
||||||
|
|
||||||
package sun.net.www.protocol.netdoc;
|
|
||||||
|
|
||||||
import java.net.URL;
|
|
||||||
import java.net.URLConnection;
|
|
||||||
import java.net.MalformedURLException;
|
|
||||||
import java.net.URLStreamHandler;
|
|
||||||
import java.io.InputStream;
|
|
||||||
import java.io.IOException;
|
|
||||||
import sun.security.action.GetPropertyAction;
|
|
||||||
|
|
||||||
public class Handler extends URLStreamHandler {
|
|
||||||
static URL base;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Attempt to find a load the given url using the default (network)
|
|
||||||
* documentation location. If that fails, use the local copy
|
|
||||||
*/
|
|
||||||
public synchronized URLConnection openConnection(URL u)
|
|
||||||
throws IOException
|
|
||||||
{
|
|
||||||
URLConnection uc = null;
|
|
||||||
URL ru;
|
|
||||||
|
|
||||||
boolean localonly = Boolean.parseBoolean(
|
|
||||||
GetPropertyAction.privilegedGetProperty("newdoc.localonly"));
|
|
||||||
|
|
||||||
String docurl = GetPropertyAction.privilegedGetProperty("doc.url");
|
|
||||||
|
|
||||||
String file = u.getFile();
|
|
||||||
if (!localonly) {
|
|
||||||
try {
|
|
||||||
if (base == null) {
|
|
||||||
base = new URL(docurl);
|
|
||||||
}
|
|
||||||
ru = new URL(base, file);
|
|
||||||
} catch (MalformedURLException e) {
|
|
||||||
ru = null;
|
|
||||||
}
|
|
||||||
if (ru != null) {
|
|
||||||
uc = ru.openConnection();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (uc == null) {
|
|
||||||
try {
|
|
||||||
ru = new URL("file", "~", file);
|
|
||||||
|
|
||||||
uc = ru.openConnection();
|
|
||||||
InputStream is = uc.getInputStream(); // Check for success.
|
|
||||||
} catch (MalformedURLException e) {
|
|
||||||
uc = null;
|
|
||||||
} catch (IOException e) {
|
|
||||||
uc = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (uc == null) {
|
|
||||||
throw new IOException("Can't find file for URL: "
|
|
||||||
+u.toExternalForm());
|
|
||||||
}
|
|
||||||
return uc;
|
|
||||||
}
|
|
||||||
}
|
|
@ -354,8 +354,8 @@ abstract class SeedGenerator {
|
|||||||
// We wait 250milli quanta, so the minimum wait time
|
// We wait 250milli quanta, so the minimum wait time
|
||||||
// cannot be under 250milli.
|
// cannot be under 250milli.
|
||||||
int latch = 0;
|
int latch = 0;
|
||||||
long l = System.currentTimeMillis() + 250;
|
long startTime = System.nanoTime();
|
||||||
while (System.currentTimeMillis() < l) {
|
while (System.nanoTime() - startTime < 250000000) {
|
||||||
synchronized(this){};
|
synchronized(this){};
|
||||||
latch++;
|
latch++;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -34,7 +34,6 @@ import java.nio.charset.CoderResult;
|
|||||||
import java.nio.charset.CodingErrorAction;
|
import java.nio.charset.CodingErrorAction;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import sun.util.logging.PlatformLogger;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Charset implementation for reading PropertyResourceBundle, in order
|
* A Charset implementation for reading PropertyResourceBundle, in order
|
||||||
@ -94,12 +93,11 @@ public class PropertyResourceBundleCharset extends Charset {
|
|||||||
return cr;
|
return cr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Invalid or unmappable UTF-8 sequence detected.
|
||||||
|
// Switching to the ISO 8859-1 decorder.
|
||||||
|
assert cr.isMalformed() || cr.isUnmappable();
|
||||||
in.reset();
|
in.reset();
|
||||||
out.reset();
|
out.reset();
|
||||||
|
|
||||||
PlatformLogger.getLogger(getClass().getCanonicalName()).info(
|
|
||||||
"Invalid or unmappable UTF-8 sequence detected. " +
|
|
||||||
"Switching encoding from UTF-8 to ISO-8859-1");
|
|
||||||
cdISO_8859_1 = StandardCharsets.ISO_8859_1.newDecoder();
|
cdISO_8859_1 = StandardCharsets.ISO_8859_1.newDecoder();
|
||||||
return cdISO_8859_1.decode(in, out, false);
|
return cdISO_8859_1.decode(in, out, false);
|
||||||
}
|
}
|
||||||
|
@ -134,6 +134,16 @@
|
|||||||
"no_NY", "no_NO@nynorsk",
|
"no_NY", "no_NO@nynorsk",
|
||||||
"sr_SP", "sr_YU",
|
"sr_SP", "sr_YU",
|
||||||
"tchinese", "zh_TW",
|
"tchinese", "zh_TW",
|
||||||
|
#endif
|
||||||
|
#ifdef MACOSX
|
||||||
|
"sr-Latn", "sr_CS", // Mappings as done by old Apple JRS code
|
||||||
|
"tk", "tk-Cyrl",
|
||||||
|
"tt-Latn", "tt-Cyrl",
|
||||||
|
"uz", "uz_UZ",
|
||||||
|
"uz-Arab", "uz_UZ",
|
||||||
|
"uz-Latn", "uz_UZ",
|
||||||
|
"zh-Hans", "zh_CN",
|
||||||
|
"zh-Hant", "zh_TW",
|
||||||
#endif
|
#endif
|
||||||
"", "",
|
"", "",
|
||||||
};
|
};
|
||||||
|
@ -128,6 +128,7 @@ class PlainHttpConnection extends HttpConnection implements AsyncConnection {
|
|||||||
this.chan = SocketChannel.open();
|
this.chan = SocketChannel.open();
|
||||||
int bufsize = client.getReceiveBufferSize();
|
int bufsize = client.getReceiveBufferSize();
|
||||||
chan.setOption(StandardSocketOptions.SO_RCVBUF, bufsize);
|
chan.setOption(StandardSocketOptions.SO_RCVBUF, bufsize);
|
||||||
|
chan.setOption(StandardSocketOptions.TCP_NODELAY, true);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new InternalError(e);
|
throw new InternalError(e);
|
||||||
}
|
}
|
||||||
|
@ -617,6 +617,7 @@ class Stream extends ExchangeImpl {
|
|||||||
void sendBodyImpl() throws IOException, InterruptedException {
|
void sendBodyImpl() throws IOException, InterruptedException {
|
||||||
if (requestContentLen == 0) {
|
if (requestContentLen == 0) {
|
||||||
// no body
|
// no body
|
||||||
|
requestSent();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
DataFrame df;
|
DataFrame df;
|
||||||
@ -667,7 +668,7 @@ class Stream extends ExchangeImpl {
|
|||||||
responseFlowController); // TODO: filter headers
|
responseFlowController); // TODO: filter headers
|
||||||
if (body == null) {
|
if (body == null) {
|
||||||
receiveData();
|
receiveData();
|
||||||
return processor.onResponseComplete();
|
body = processor.onResponseComplete();
|
||||||
} else
|
} else
|
||||||
receiveDataAsync(processor);
|
receiveDataAsync(processor);
|
||||||
responseReceived();
|
responseReceived();
|
||||||
|
@ -34,7 +34,6 @@ import java.util.concurrent.CompletionStage;
|
|||||||
import java.util.concurrent.Executor;
|
import java.util.concurrent.Executor;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
import java.util.stream.Stream;
|
|
||||||
|
|
||||||
import static java.lang.System.Logger.Level.ERROR;
|
import static java.lang.System.Logger.Level.ERROR;
|
||||||
import static java.lang.System.Logger.Level.WARNING;
|
import static java.lang.System.Logger.Level.WARNING;
|
||||||
@ -103,15 +102,6 @@ final class WS implements WebSocket {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public CompletableFuture<WebSocket> sendText(Stream<? extends CharSequence> message) {
|
|
||||||
requireNonNull(message, "message");
|
|
||||||
synchronized (stateLock) {
|
|
||||||
checkState();
|
|
||||||
return transmitter.sendText(message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CompletableFuture<WebSocket> sendBinary(ByteBuffer message, boolean isLast) {
|
public CompletableFuture<WebSocket> sendBinary(ByteBuffer message, boolean isLast) {
|
||||||
requireNonNull(message, "message");
|
requireNonNull(message, "message");
|
||||||
@ -179,11 +169,11 @@ final class WS implements WebSocket {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long request(long n) {
|
public void request(long n) {
|
||||||
if (n < 0L) {
|
if (n < 0L) {
|
||||||
throw new IllegalArgumentException("The number must not be negative: " + n);
|
throw new IllegalArgumentException("The number must not be negative: " + n);
|
||||||
}
|
}
|
||||||
return receiver.request(n);
|
receiver.request(n);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
package java.net.http;
|
package java.net.http;
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
|
import java.time.Duration;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@ -59,8 +60,7 @@ final class WSBuilder implements WebSocket.Builder {
|
|||||||
private final LinkedHashMap<String, List<String>> headers = new LinkedHashMap<>();
|
private final LinkedHashMap<String, List<String>> headers = new LinkedHashMap<>();
|
||||||
private final WebSocket.Listener listener;
|
private final WebSocket.Listener listener;
|
||||||
private Collection<String> subprotocols = Collections.emptyList();
|
private Collection<String> subprotocols = Collections.emptyList();
|
||||||
private long timeout;
|
private Duration timeout;
|
||||||
private TimeUnit timeUnit;
|
|
||||||
|
|
||||||
WSBuilder(URI uri, HttpClient client, WebSocket.Listener listener) {
|
WSBuilder(URI uri, HttpClient client, WebSocket.Listener listener) {
|
||||||
checkURI(requireNonNull(uri, "uri"));
|
checkURI(requireNonNull(uri, "uri"));
|
||||||
@ -93,13 +93,8 @@ final class WSBuilder implements WebSocket.Builder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public WebSocket.Builder connectTimeout(long timeout, TimeUnit unit) {
|
public WebSocket.Builder connectTimeout(Duration timeout) {
|
||||||
if (timeout < 0) {
|
this.timeout = requireNonNull(timeout, "timeout");
|
||||||
throw new IllegalArgumentException("Negative timeout: " + timeout);
|
|
||||||
}
|
|
||||||
requireNonNull(unit, "unit");
|
|
||||||
this.timeout = timeout;
|
|
||||||
this.timeUnit = unit;
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -139,9 +134,7 @@ final class WSBuilder implements WebSocket.Builder {
|
|||||||
return new ArrayList<>(subprotocols);
|
return new ArrayList<>(subprotocols);
|
||||||
}
|
}
|
||||||
|
|
||||||
long getTimeout() { return timeout; }
|
Duration getConnectTimeout() { return timeout; }
|
||||||
|
|
||||||
TimeUnit getTimeUnit() { return timeUnit; }
|
|
||||||
|
|
||||||
private static Collection<String> checkSubprotocols(String mostPreferred,
|
private static Collection<String> checkSubprotocols(String mostPreferred,
|
||||||
String... lesserPreferred) {
|
String... lesserPreferred) {
|
||||||
|
@ -206,7 +206,7 @@ final class WSFrameConsumer implements WSFrame.Consumer {
|
|||||||
boolean binaryNonEmpty = data.hasRemaining();
|
boolean binaryNonEmpty = data.hasRemaining();
|
||||||
WSShared<CharBuffer> textData;
|
WSShared<CharBuffer> textData;
|
||||||
try {
|
try {
|
||||||
textData = decoder.decode(data, part.isLast());
|
textData = decoder.decode(data, part == MessagePart.WHOLE || part == MessagePart.LAST);
|
||||||
} catch (CharacterCodingException e) {
|
} catch (CharacterCodingException e) {
|
||||||
throw new WSProtocolException
|
throw new WSProtocolException
|
||||||
("5.6.", "Invalid UTF-8 sequence in frame " + opcode, NOT_CONSISTENT, e);
|
("5.6.", "Invalid UTF-8 sequence in frame " + opcode, NOT_CONSISTENT, e);
|
||||||
|
@ -30,7 +30,6 @@ import java.net.http.WSOutgoingMessage.Binary;
|
|||||||
import java.net.http.WSOutgoingMessage.Close;
|
import java.net.http.WSOutgoingMessage.Close;
|
||||||
import java.net.http.WSOutgoingMessage.Ping;
|
import java.net.http.WSOutgoingMessage.Ping;
|
||||||
import java.net.http.WSOutgoingMessage.Pong;
|
import java.net.http.WSOutgoingMessage.Pong;
|
||||||
import java.net.http.WSOutgoingMessage.StreamedText;
|
|
||||||
import java.net.http.WSOutgoingMessage.Text;
|
import java.net.http.WSOutgoingMessage.Text;
|
||||||
import java.net.http.WSOutgoingMessage.Visitor;
|
import java.net.http.WSOutgoingMessage.Visitor;
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
@ -122,11 +121,6 @@ final class WSMessageSender {
|
|||||||
previousIsLast = message.isLast;
|
previousIsLast = message.isLast;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void visit(StreamedText streamedText) {
|
|
||||||
throw new IllegalArgumentException("Not yet implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void visit(Binary message) {
|
public void visit(Binary message) {
|
||||||
buffers[1] = message.bytes;
|
buffers[1] = message.bytes;
|
||||||
|
@ -32,11 +32,14 @@ import java.nio.charset.StandardCharsets;
|
|||||||
import java.security.MessageDigest;
|
import java.security.MessageDigest;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
import java.security.SecureRandom;
|
import java.security.SecureRandom;
|
||||||
|
import java.time.Duration;
|
||||||
|
import java.time.temporal.ChronoUnit;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ -77,8 +80,12 @@ final class WSOpeningHandshake {
|
|||||||
WSOpeningHandshake(WSBuilder b) {
|
WSOpeningHandshake(WSBuilder b) {
|
||||||
URI httpURI = createHttpUri(b.getUri());
|
URI httpURI = createHttpUri(b.getUri());
|
||||||
HttpRequest.Builder requestBuilder = b.getClient().request(httpURI);
|
HttpRequest.Builder requestBuilder = b.getClient().request(httpURI);
|
||||||
if (b.getTimeUnit() != null) {
|
Duration connectTimeout = b.getConnectTimeout();
|
||||||
requestBuilder.timeout(b.getTimeUnit(), b.getTimeout());
|
if (connectTimeout != null) {
|
||||||
|
requestBuilder.timeout(
|
||||||
|
TimeUnit.of(ChronoUnit.MILLIS),
|
||||||
|
connectTimeout.get(ChronoUnit.MILLIS)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
Collection<String> s = b.getSubprotocols();
|
Collection<String> s = b.getSubprotocols();
|
||||||
if (!s.isEmpty()) {
|
if (!s.isEmpty()) {
|
||||||
|
@ -25,13 +25,11 @@
|
|||||||
package java.net.http;
|
package java.net.http;
|
||||||
|
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.util.stream.Stream;
|
|
||||||
|
|
||||||
abstract class WSOutgoingMessage {
|
abstract class WSOutgoingMessage {
|
||||||
|
|
||||||
interface Visitor {
|
interface Visitor {
|
||||||
void visit(Text message);
|
void visit(Text message);
|
||||||
void visit(StreamedText message);
|
|
||||||
void visit(Binary message);
|
void visit(Binary message);
|
||||||
void visit(Ping message);
|
void visit(Ping message);
|
||||||
void visit(Pong message);
|
void visit(Pong message);
|
||||||
@ -64,25 +62,6 @@ abstract class WSOutgoingMessage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static final class StreamedText extends WSOutgoingMessage {
|
|
||||||
|
|
||||||
public final Stream<? extends CharSequence> characters;
|
|
||||||
|
|
||||||
StreamedText(Stream<? extends CharSequence> characters) {
|
|
||||||
this.characters = characters;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
void accept(Visitor visitor) {
|
|
||||||
visitor.visit(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return WSUtils.toStringSimple(this) + "[characters=" + characters + "]";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static final class Binary extends WSOutgoingMessage {
|
static final class Binary extends WSOutgoingMessage {
|
||||||
|
|
||||||
public final boolean isLast;
|
public final boolean isLast;
|
||||||
|
@ -101,11 +101,10 @@ final class WSReceiver {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
long request(long n) {
|
void request(long n) {
|
||||||
long newDemand = demand.accumulateAndGet(n, (p, i) -> p + i < 0 ? Long.MAX_VALUE : p + i);
|
long newDemand = demand.accumulateAndGet(n, (p, i) -> p + i < 0 ? Long.MAX_VALUE : p + i);
|
||||||
handler.signal();
|
handler.signal();
|
||||||
assert newDemand >= 0 : newDemand;
|
assert newDemand >= 0 : newDemand;
|
||||||
return newDemand;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean getData() throws IOException {
|
private boolean getData() throws IOException {
|
||||||
|
@ -28,7 +28,6 @@ import java.net.http.WSOutgoingMessage.Binary;
|
|||||||
import java.net.http.WSOutgoingMessage.Close;
|
import java.net.http.WSOutgoingMessage.Close;
|
||||||
import java.net.http.WSOutgoingMessage.Ping;
|
import java.net.http.WSOutgoingMessage.Ping;
|
||||||
import java.net.http.WSOutgoingMessage.Pong;
|
import java.net.http.WSOutgoingMessage.Pong;
|
||||||
import java.net.http.WSOutgoingMessage.StreamedText;
|
|
||||||
import java.net.http.WSOutgoingMessage.Text;
|
import java.net.http.WSOutgoingMessage.Text;
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.nio.CharBuffer;
|
import java.nio.CharBuffer;
|
||||||
@ -40,7 +39,6 @@ import java.util.concurrent.CompletableFuture;
|
|||||||
import java.util.concurrent.Executor;
|
import java.util.concurrent.Executor;
|
||||||
import java.util.concurrent.LinkedBlockingQueue;
|
import java.util.concurrent.LinkedBlockingQueue;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
import java.util.stream.Stream;
|
|
||||||
|
|
||||||
import static java.lang.String.format;
|
import static java.lang.String.format;
|
||||||
import static java.net.http.Pair.pair;
|
import static java.net.http.Pair.pair;
|
||||||
@ -83,11 +81,6 @@ final class WSTransmitter {
|
|||||||
return acceptMessage(new Text(isLast, message));
|
return acceptMessage(new Text(isLast, message));
|
||||||
}
|
}
|
||||||
|
|
||||||
CompletableFuture<WebSocket> sendText(Stream<? extends CharSequence> message) {
|
|
||||||
checkAndUpdateText(true);
|
|
||||||
return acceptMessage(new StreamedText(message));
|
|
||||||
}
|
|
||||||
|
|
||||||
CompletableFuture<WebSocket> sendBinary(ByteBuffer message, boolean isLast) {
|
CompletableFuture<WebSocket> sendBinary(ByteBuffer message, boolean isLast) {
|
||||||
checkAndUpdateBinary(isLast);
|
checkAndUpdateBinary(isLast);
|
||||||
return acceptMessage(new Binary(isLast, message));
|
return acceptMessage(new Binary(isLast, message));
|
||||||
|
@ -28,13 +28,11 @@ import java.io.IOException;
|
|||||||
import java.net.ProtocolException;
|
import java.net.ProtocolException;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
|
import java.time.Duration;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
import java.util.concurrent.CompletionStage;
|
import java.util.concurrent.CompletionStage;
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
import java.util.stream.Stream;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A WebSocket client conforming to RFC 6455.
|
* A WebSocket client conforming to RFC 6455.
|
||||||
@ -47,8 +45,9 @@ import java.util.stream.Stream;
|
|||||||
* receive messages. When the {@code WebSocket} is no longer
|
* receive messages. When the {@code WebSocket} is no longer
|
||||||
* needed it must be closed: a Close message must both be {@linkplain
|
* needed it must be closed: a Close message must both be {@linkplain
|
||||||
* #sendClose() sent} and {@linkplain Listener#onClose(WebSocket, Optional,
|
* #sendClose() sent} and {@linkplain Listener#onClose(WebSocket, Optional,
|
||||||
* String) received}. Or to close abruptly, {@link #abort()} is called. Once
|
* String) received}. Otherwise, invoke {@link #abort() abort} to close abruptly.
|
||||||
* closed it remains closed, cannot be reopened.
|
*
|
||||||
|
* <p> Once closed the {@code WebSocket} remains closed and cannot be reopened.
|
||||||
*
|
*
|
||||||
* <p> Messages of type {@code X} are sent through the {@code WebSocket.sendX}
|
* <p> Messages of type {@code X} are sent through the {@code WebSocket.sendX}
|
||||||
* methods and received through {@link WebSocket.Listener}{@code .onX} methods
|
* methods and received through {@link WebSocket.Listener}{@code .onX} methods
|
||||||
@ -71,10 +70,6 @@ import java.util.stream.Stream;
|
|||||||
* arranged from the {@code buffer}'s {@link ByteBuffer#position() position} to
|
* arranged from the {@code buffer}'s {@link ByteBuffer#position() position} to
|
||||||
* the {@code buffer}'s {@link ByteBuffer#limit() limit}.
|
* the {@code buffer}'s {@link ByteBuffer#limit() limit}.
|
||||||
*
|
*
|
||||||
* <p> All message exchange is run by the threads belonging to the {@linkplain
|
|
||||||
* HttpClient#executorService() executor service} of {@code WebSocket}'s {@link
|
|
||||||
* HttpClient}.
|
|
||||||
*
|
|
||||||
* <p> Unless otherwise noted, passing a {@code null} argument to a constructor
|
* <p> Unless otherwise noted, passing a {@code null} argument to a constructor
|
||||||
* or method of this type will cause a {@link NullPointerException
|
* or method of this type will cause a {@link NullPointerException
|
||||||
* NullPointerException} to be thrown.
|
* NullPointerException} to be thrown.
|
||||||
@ -217,22 +212,17 @@ public interface WebSocket {
|
|||||||
* Sets a timeout for the opening handshake.
|
* Sets a timeout for the opening handshake.
|
||||||
*
|
*
|
||||||
* <p> If the opening handshake is not finished within the specified
|
* <p> If the opening handshake is not finished within the specified
|
||||||
* timeout then {@link #buildAsync()} completes exceptionally with a
|
* amount of time then {@link #buildAsync()} completes exceptionally
|
||||||
* {@code HttpTimeoutException}.
|
* with a {@code HttpTimeoutException}.
|
||||||
*
|
*
|
||||||
* <p> If the timeout is not specified then it's deemed infinite.
|
* <p> If this method is not invoked then the timeout is deemed infinite.
|
||||||
*
|
*
|
||||||
* @param timeout
|
* @param timeout
|
||||||
* the maximum time to wait
|
* the timeout
|
||||||
* @param unit
|
|
||||||
* the time unit of the timeout argument
|
|
||||||
*
|
*
|
||||||
* @return this builder
|
* @return this builder
|
||||||
*
|
|
||||||
* @throws IllegalArgumentException
|
|
||||||
* if the {@code timeout} is negative
|
|
||||||
*/
|
*/
|
||||||
Builder connectTimeout(long timeout, TimeUnit unit);
|
Builder connectTimeout(Duration timeout);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds a {@code WebSocket}.
|
* Builds a {@code WebSocket}.
|
||||||
@ -506,7 +496,7 @@ public interface WebSocket {
|
|||||||
* <p> Once a Close message is received, the server will not send any
|
* <p> Once a Close message is received, the server will not send any
|
||||||
* more messages.
|
* more messages.
|
||||||
*
|
*
|
||||||
* <p> A Close message may consist of a close code and a reason for
|
* <p> A Close message may consist of a status code and a reason for
|
||||||
* closing. The reason will have a UTF-8 representation not longer than
|
* closing. The reason will have a UTF-8 representation not longer than
|
||||||
* {@code 123} bytes. The reason may be useful for debugging or passing
|
* {@code 123} bytes. The reason may be useful for debugging or passing
|
||||||
* information relevant to the connection but is not necessarily human
|
* information relevant to the connection but is not necessarily human
|
||||||
@ -545,12 +535,8 @@ public interface WebSocket {
|
|||||||
* the time {@code onError} is invoked, no more messages can be sent on
|
* the time {@code onError} is invoked, no more messages can be sent on
|
||||||
* this {@code WebSocket}.
|
* this {@code WebSocket}.
|
||||||
*
|
*
|
||||||
* @apiNote Errors associated with send operations ({@link
|
* @apiNote Errors associated with {@code sendX} methods are reported to
|
||||||
* WebSocket#sendText(CharSequence, boolean) sendText}, {@link
|
* the {@code CompletableFuture} these methods return.
|
||||||
* #sendBinary(ByteBuffer, boolean) sendBinary}, {@link
|
|
||||||
* #sendPing(ByteBuffer) sendPing}, {@link #sendPong(ByteBuffer)
|
|
||||||
* sendPong} and {@link #sendClose(CloseCode, CharSequence) sendClose})
|
|
||||||
* are reported to the {@code CompletionStage} operations return.
|
|
||||||
*
|
*
|
||||||
* @implSpec The default implementation does nothing.
|
* @implSpec The default implementation does nothing.
|
||||||
*
|
*
|
||||||
@ -563,8 +549,8 @@ public interface WebSocket {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A marker used by {@link WebSocket.Listener} for partial message
|
* A marker used by {@link WebSocket.Listener} in cases where a partial
|
||||||
* receiving.
|
* message may be received.
|
||||||
*
|
*
|
||||||
* @since 9
|
* @since 9
|
||||||
*/
|
*/
|
||||||
@ -586,19 +572,9 @@ public interface WebSocket {
|
|||||||
LAST,
|
LAST,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A whole message. The message consists of a single part.
|
* A whole message consisting of a single part.
|
||||||
*/
|
*/
|
||||||
WHOLE;
|
WHOLE
|
||||||
|
|
||||||
/**
|
|
||||||
* Tells whether a part of a message received with this marker is the
|
|
||||||
* last part.
|
|
||||||
*
|
|
||||||
* @return {@code true} if LAST or WHOLE, {@code false} otherwise
|
|
||||||
*/
|
|
||||||
public boolean isLast() {
|
|
||||||
return this == LAST || this == WHOLE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -630,7 +606,7 @@ public interface WebSocket {
|
|||||||
* @param message
|
* @param message
|
||||||
* the message
|
* the message
|
||||||
* @param isLast
|
* @param isLast
|
||||||
* {@code true} if this is the final part of the message,
|
* {@code true} if this is the last part of the message,
|
||||||
* {@code false} otherwise
|
* {@code false} otherwise
|
||||||
*
|
*
|
||||||
* @return a CompletableFuture with this WebSocket
|
* @return a CompletableFuture with this WebSocket
|
||||||
@ -678,43 +654,6 @@ public interface WebSocket {
|
|||||||
return sendText(message, true);
|
return sendText(message, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Sends a whole Text message with characters from {@code
|
|
||||||
* CharacterSequence}s provided by the given {@code Stream}.
|
|
||||||
*
|
|
||||||
* <p> This is a convenience method. For the general case use {@link
|
|
||||||
* #sendText(CharSequence, boolean)}.
|
|
||||||
*
|
|
||||||
* <p> Returns a {@code CompletableFuture<WebSocket>} which completes
|
|
||||||
* normally when the message has been sent or completes exceptionally if an
|
|
||||||
* error occurs.
|
|
||||||
*
|
|
||||||
* <p> Streamed character sequences should not be modified until the
|
|
||||||
* returned {@code CompletableFuture} completes (either normally or
|
|
||||||
* exceptionally).
|
|
||||||
*
|
|
||||||
* <p> The returned {@code CompletableFuture} can complete exceptionally
|
|
||||||
* with:
|
|
||||||
* <ul>
|
|
||||||
* <li> {@link IOException}
|
|
||||||
* if an I/O error occurs during this operation
|
|
||||||
* <li> {@link IllegalStateException}
|
|
||||||
* if the {@code WebSocket} closes while this operation is in progress;
|
|
||||||
* or if a Close message has been sent already;
|
|
||||||
* or if there is an outstanding send operation;
|
|
||||||
* or if a previous Binary message was not sent with {@code isLast == true}
|
|
||||||
* </ul>
|
|
||||||
*
|
|
||||||
* @param message
|
|
||||||
* the message
|
|
||||||
*
|
|
||||||
* @return a CompletableFuture with this WebSocket
|
|
||||||
*
|
|
||||||
* @throws IllegalArgumentException
|
|
||||||
* if {@code message} is a malformed (or an incomplete) UTF-16 sequence
|
|
||||||
*/
|
|
||||||
CompletableFuture<WebSocket> sendText(Stream<? extends CharSequence> message);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends a Binary message with bytes from the given {@code ByteBuffer}.
|
* Sends a Binary message with bytes from the given {@code ByteBuffer}.
|
||||||
*
|
*
|
||||||
@ -737,50 +676,13 @@ public interface WebSocket {
|
|||||||
* @param message
|
* @param message
|
||||||
* the message
|
* the message
|
||||||
* @param isLast
|
* @param isLast
|
||||||
* {@code true} if this is the final part of the message,
|
* {@code true} if this is the last part of the message,
|
||||||
* {@code false} otherwise
|
* {@code false} otherwise
|
||||||
*
|
*
|
||||||
* @return a CompletableFuture with this WebSocket
|
* @return a CompletableFuture with this WebSocket
|
||||||
*/
|
*/
|
||||||
CompletableFuture<WebSocket> sendBinary(ByteBuffer message, boolean isLast);
|
CompletableFuture<WebSocket> sendBinary(ByteBuffer message, boolean isLast);
|
||||||
|
|
||||||
/**
|
|
||||||
* Sends a Binary message with bytes from the given {@code byte[]}.
|
|
||||||
*
|
|
||||||
* <p> Returns a {@code CompletableFuture<WebSocket>} which completes
|
|
||||||
* normally when the message has been sent or completes exceptionally if an
|
|
||||||
* error occurs.
|
|
||||||
*
|
|
||||||
* <p> The returned {@code CompletableFuture} can complete exceptionally
|
|
||||||
* with:
|
|
||||||
* <ul>
|
|
||||||
* <li> {@link IOException}
|
|
||||||
* if an I/O error occurs during this operation
|
|
||||||
* <li> {@link IllegalStateException}
|
|
||||||
* if the {@code WebSocket} closes while this operation is in progress;
|
|
||||||
* or if a Close message has been sent already;
|
|
||||||
* or if there is an outstanding send operation;
|
|
||||||
* or if a previous Text message was not sent with {@code isLast == true}
|
|
||||||
* </ul>
|
|
||||||
*
|
|
||||||
* @implSpec This is equivalent to:
|
|
||||||
* <pre>{@code
|
|
||||||
* sendBinary(ByteBuffer.wrap(message), isLast)
|
|
||||||
* }</pre>
|
|
||||||
*
|
|
||||||
* @param message
|
|
||||||
* the message
|
|
||||||
* @param isLast
|
|
||||||
* {@code true} if this is the final part of the message,
|
|
||||||
* {@code false} otherwise
|
|
||||||
*
|
|
||||||
* @return a CompletableFuture with this WebSocket
|
|
||||||
*/
|
|
||||||
default CompletableFuture<WebSocket> sendBinary(byte[] message, boolean isLast) {
|
|
||||||
Objects.requireNonNull(message, "message");
|
|
||||||
return sendBinary(ByteBuffer.wrap(message), isLast);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends a Ping message.
|
* Sends a Ping message.
|
||||||
*
|
*
|
||||||
@ -858,10 +760,11 @@ public interface WebSocket {
|
|||||||
* normally when the message has been sent or completes exceptionally if an
|
* normally when the message has been sent or completes exceptionally if an
|
||||||
* error occurs.
|
* error occurs.
|
||||||
*
|
*
|
||||||
* <p> A Close message may consist of a close code and a reason for closing.
|
* <p> A Close message may consist of a status code and a reason for
|
||||||
* The reason must have a valid UTF-8 representation not longer than {@code
|
* closing. The reason must have a UTF-8 representation not longer than
|
||||||
* 123} bytes. The reason may be useful for debugging or passing information
|
* {@code 123} bytes. The reason may be useful for debugging or passing
|
||||||
* relevant to the connection but is not necessarily human readable.
|
* information relevant to the connection but is not necessarily human
|
||||||
|
* readable.
|
||||||
*
|
*
|
||||||
* <p> The returned {@code CompletableFuture} can complete exceptionally
|
* <p> The returned {@code CompletableFuture} can complete exceptionally
|
||||||
* with:
|
* with:
|
||||||
@ -910,24 +813,21 @@ public interface WebSocket {
|
|||||||
CompletableFuture<WebSocket> sendClose();
|
CompletableFuture<WebSocket> sendClose();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Requests {@code n} more messages to be received by the {@link Listener
|
* Allows {@code n} more messages to be received by the {@link Listener
|
||||||
* Listener}.
|
* Listener}.
|
||||||
*
|
*
|
||||||
* <p> The actual number might be fewer if either of the endpoints decide to
|
* <p> The actual number of received messages might be fewer if a Close
|
||||||
* close the connection before that or an error occurs.
|
* message is received, the connection closes or an error occurs.
|
||||||
*
|
*
|
||||||
* <p> A {@code WebSocket} that has just been created, hasn't requested
|
* <p> A {@code WebSocket} that has just been created, hasn't requested
|
||||||
* anything yet. Usually the initial request for messages is done in {@link
|
* anything yet. Usually the initial request for messages is done in {@link
|
||||||
* Listener#onOpen(java.net.http.WebSocket) Listener.onOpen}.
|
* Listener#onOpen(java.net.http.WebSocket) Listener.onOpen}.
|
||||||
*
|
*
|
||||||
* If all requested messages have been received, and the server sends more,
|
|
||||||
* then these messages are queued.
|
|
||||||
*
|
|
||||||
* @implNote This implementation does not distinguish between partial and
|
* @implNote This implementation does not distinguish between partial and
|
||||||
* whole messages, because it's not known beforehand how a message will be
|
* whole messages, because it's not known beforehand how a message will be
|
||||||
* received.
|
* received.
|
||||||
*
|
*
|
||||||
* <p> If a server sends more messages than requested, the implementation
|
* <p> If a server sends more messages than requested, this implementation
|
||||||
* queues up these messages on the TCP connection and may eventually force
|
* queues up these messages on the TCP connection and may eventually force
|
||||||
* the sender to stop sending through TCP flow control.
|
* the sender to stop sending through TCP flow control.
|
||||||
*
|
*
|
||||||
@ -936,12 +836,8 @@ public interface WebSocket {
|
|||||||
*
|
*
|
||||||
* @throws IllegalArgumentException
|
* @throws IllegalArgumentException
|
||||||
* if {@code n < 0}
|
* if {@code n < 0}
|
||||||
*
|
|
||||||
* @return resulting unfulfilled demand with this request taken into account
|
|
||||||
*/
|
*/
|
||||||
// TODO return void as it's breaking encapsulation (leaking info when exactly something deemed delivered)
|
void request(long n);
|
||||||
// or demand behaves after LONG.MAX_VALUE
|
|
||||||
long request(long n);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a {@linkplain Builder#subprotocols(String, String...) subprotocol}
|
* Returns a {@linkplain Builder#subprotocols(String, String...) subprotocol}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2002, 2011, 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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -60,7 +60,6 @@ class DigestClientId extends SimpleClientId {
|
|||||||
|
|
||||||
final private String[] propvals;
|
final private String[] propvals;
|
||||||
final private int myHash;
|
final private int myHash;
|
||||||
private int pHash = 0;
|
|
||||||
|
|
||||||
DigestClientId(int version, String hostname, int port,
|
DigestClientId(int version, String hostname, int port,
|
||||||
String protocol, Control[] bindCtls, OutputStream trace,
|
String protocol, Control[] bindCtls, OutputStream trace,
|
||||||
@ -78,12 +77,9 @@ class DigestClientId extends SimpleClientId {
|
|||||||
propvals = new String[SASL_PROPS.length];
|
propvals = new String[SASL_PROPS.length];
|
||||||
for (int i = 0; i < SASL_PROPS.length; i++) {
|
for (int i = 0; i < SASL_PROPS.length; i++) {
|
||||||
propvals[i] = (String) env.get(SASL_PROPS[i]);
|
propvals[i] = (String) env.get(SASL_PROPS[i]);
|
||||||
if (propvals[i] != null) {
|
|
||||||
pHash = pHash * 31 + propvals[i].hashCode();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
myHash = super.hashCode() + pHash;
|
myHash = super.hashCode() ^ Arrays.hashCode(propvals);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean equals(Object obj) {
|
public boolean equals(Object obj) {
|
||||||
@ -92,7 +88,6 @@ class DigestClientId extends SimpleClientId {
|
|||||||
}
|
}
|
||||||
DigestClientId other = (DigestClientId)obj;
|
DigestClientId other = (DigestClientId)obj;
|
||||||
return myHash == other.myHash
|
return myHash == other.myHash
|
||||||
&& pHash == other.pHash
|
|
||||||
&& super.equals(obj)
|
&& super.equals(obj)
|
||||||
&& Arrays.equals(propvals, other.propvals);
|
&& Arrays.equals(propvals, other.propvals);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2002, 2011, 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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -49,21 +49,23 @@ class SimpleClientId extends ClientId {
|
|||||||
socketFactory);
|
socketFactory);
|
||||||
|
|
||||||
this.username = username;
|
this.username = username;
|
||||||
|
int pwdHashCode = 0;
|
||||||
if (passwd == null) {
|
if (passwd == null) {
|
||||||
this.passwd = null;
|
this.passwd = null;
|
||||||
} else if (passwd instanceof String) {
|
|
||||||
this.passwd = passwd;
|
|
||||||
} else if (passwd instanceof byte[]) {
|
} else if (passwd instanceof byte[]) {
|
||||||
this.passwd = ((byte[])passwd).clone();
|
this.passwd = ((byte[])passwd).clone();
|
||||||
|
pwdHashCode = Arrays.hashCode((byte[])passwd);
|
||||||
} else if (passwd instanceof char[]) {
|
} else if (passwd instanceof char[]) {
|
||||||
this.passwd = ((char[])passwd).clone();
|
this.passwd = ((char[])passwd).clone();
|
||||||
|
pwdHashCode = Arrays.hashCode((char[])passwd);
|
||||||
} else {
|
} else {
|
||||||
this.passwd = passwd;
|
this.passwd = passwd;
|
||||||
|
pwdHashCode = passwd.hashCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
myHash = super.hashCode()
|
myHash = super.hashCode()
|
||||||
+ (username != null ? username.hashCode() : 0)
|
^ (username != null ? username.hashCode() : 0)
|
||||||
+ (passwd != null ? passwd.hashCode() : 0);
|
^ pwdHashCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean equals(Object obj) {
|
public boolean equals(Object obj) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Copyright (c) 2002 Graz University of Technology. All rights reserved.
|
/* Copyright (c) 2002 Graz University of Technology. All rights reserved.
|
||||||
@ -54,6 +54,8 @@ import java.util.*;
|
|||||||
import java.security.AccessController;
|
import java.security.AccessController;
|
||||||
import java.security.PrivilegedAction;
|
import java.security.PrivilegedAction;
|
||||||
|
|
||||||
|
import sun.security.util.Debug;
|
||||||
|
|
||||||
import static sun.security.pkcs11.wrapper.PKCS11Constants.*;
|
import static sun.security.pkcs11.wrapper.PKCS11Constants.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -85,7 +87,8 @@ public class PKCS11 {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
initializeLibrary();
|
boolean enableDebug = Debug.getInstance("sunpkcs11") != null;
|
||||||
|
initializeLibrary(enableDebug);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void loadNative() {
|
public static void loadNative() {
|
||||||
@ -109,7 +112,7 @@ public class PKCS11 {
|
|||||||
* @preconditions
|
* @preconditions
|
||||||
* @postconditions
|
* @postconditions
|
||||||
*/
|
*/
|
||||||
private static native void initializeLibrary();
|
private static native void initializeLibrary(boolean debug);
|
||||||
|
|
||||||
// XXX
|
// XXX
|
||||||
/**
|
/**
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Copyright (c) 2002 Graz University of Technology. All rights reserved.
|
/* Copyright (c) 2002 Graz University of Technology. All rights reserved.
|
||||||
@ -73,6 +73,8 @@ jclass jLongClass;
|
|||||||
|
|
||||||
JavaVM* jvm = NULL;
|
JavaVM* jvm = NULL;
|
||||||
|
|
||||||
|
jboolean debug = 0;
|
||||||
|
|
||||||
JNIEXPORT jint JNICALL DEF_JNI_OnLoad(JavaVM *vm, void *reserved) {
|
JNIEXPORT jint JNICALL DEF_JNI_OnLoad(JavaVM *vm, void *reserved) {
|
||||||
jvm = vm;
|
jvm = vm;
|
||||||
return JNI_VERSION_1_4;
|
return JNI_VERSION_1_4;
|
||||||
@ -92,7 +94,7 @@ JNIEXPORT jint JNICALL DEF_JNI_OnLoad(JavaVM *vm, void *reserved) {
|
|||||||
*/
|
*/
|
||||||
JNIEXPORT void JNICALL
|
JNIEXPORT void JNICALL
|
||||||
Java_sun_security_pkcs11_wrapper_PKCS11_initializeLibrary
|
Java_sun_security_pkcs11_wrapper_PKCS11_initializeLibrary
|
||||||
(JNIEnv *env, jclass thisClass)
|
(JNIEnv *env, jclass thisClass, jboolean enableDebug)
|
||||||
{
|
{
|
||||||
#ifndef NO_CALLBACKS
|
#ifndef NO_CALLBACKS
|
||||||
if (notifyListLock == NULL) {
|
if (notifyListLock == NULL) {
|
||||||
@ -101,6 +103,7 @@ Java_sun_security_pkcs11_wrapper_PKCS11_initializeLibrary
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
prefetchFields(env, thisClass);
|
prefetchFields(env, thisClass);
|
||||||
|
debug = enableDebug;
|
||||||
}
|
}
|
||||||
|
|
||||||
jclass fetchClass(JNIEnv *env, const char *name) {
|
jclass fetchClass(JNIEnv *env, const char *name) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Copyright (c) 2002 Graz University of Technology. All rights reserved.
|
/* Copyright (c) 2002 Graz University of Technology. All rights reserved.
|
||||||
@ -152,6 +152,8 @@ JNIEXPORT jlongArray JNICALL Java_sun_security_pkcs11_wrapper_PKCS11_C_1Generate
|
|||||||
CK_OBJECT_HANDLE_PTR ckpKeyHandles; /* pointer to array with Public and Private Key */
|
CK_OBJECT_HANDLE_PTR ckpKeyHandles; /* pointer to array with Public and Private Key */
|
||||||
jlongArray jKeyHandles = NULL;
|
jlongArray jKeyHandles = NULL;
|
||||||
CK_RV rv;
|
CK_RV rv;
|
||||||
|
int attempts;
|
||||||
|
const int MAX_ATTEMPTS = 3;
|
||||||
|
|
||||||
CK_FUNCTION_LIST_PTR ckpFunctions = getFunctionList(env, obj);
|
CK_FUNCTION_LIST_PTR ckpFunctions = getFunctionList(env, obj);
|
||||||
if (ckpFunctions == NULL) { return NULL; }
|
if (ckpFunctions == NULL) { return NULL; }
|
||||||
@ -190,10 +192,35 @@ JNIEXPORT jlongArray JNICALL Java_sun_security_pkcs11_wrapper_PKCS11_C_1Generate
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
rv = (*ckpFunctions->C_GenerateKeyPair)(ckSessionHandle, &ckMechanism,
|
/*
|
||||||
ckpPublicKeyAttributes, ckPublicKeyAttributesLength,
|
* Workaround for NSS bug 1012786:
|
||||||
ckpPrivateKeyAttributes, ckPrivateKeyAttributesLength,
|
*
|
||||||
ckpPublicKeyHandle, ckpPrivateKeyHandle);
|
* Key generation may fail with CKR_FUNCTION_FAILED error
|
||||||
|
* if there is insufficient entropy to generate a random key.
|
||||||
|
*
|
||||||
|
* PKCS11 spec says the following about CKR_FUNCTION_FAILED error
|
||||||
|
* (see section 11.1.1):
|
||||||
|
*
|
||||||
|
* ... In any event, although the function call failed, the situation
|
||||||
|
* is not necessarily totally hopeless, as it is likely to be
|
||||||
|
* when CKR_GENERAL_ERROR is returned. Depending on what the root cause of
|
||||||
|
* the error actually was, it is possible that an attempt
|
||||||
|
* to make the exact same function call again would succeed.
|
||||||
|
*
|
||||||
|
* Call C_GenerateKeyPair() several times if CKR_FUNCTION_FAILED occurs.
|
||||||
|
*/
|
||||||
|
for (attempts = 0; attempts < MAX_ATTEMPTS; attempts++) {
|
||||||
|
rv = (*ckpFunctions->C_GenerateKeyPair)(ckSessionHandle, &ckMechanism,
|
||||||
|
ckpPublicKeyAttributes, ckPublicKeyAttributesLength,
|
||||||
|
ckpPrivateKeyAttributes, ckPrivateKeyAttributesLength,
|
||||||
|
ckpPublicKeyHandle, ckpPrivateKeyHandle);
|
||||||
|
if (rv == CKR_FUNCTION_FAILED) {
|
||||||
|
printDebug("C_1GenerateKeyPair(): C_GenerateKeyPair() failed \
|
||||||
|
with CKR_FUNCTION_FAILED error, try again\n");
|
||||||
|
} else {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (ckAssertReturnValueOK(env, rv) == CK_ASSERT_OK) {
|
if (ckAssertReturnValueOK(env, rv) == CK_ASSERT_OK) {
|
||||||
jKeyHandles = ckULongArrayToJLongArray(env, ckpKeyHandles, 2);
|
jKeyHandles = ckULongArrayToJLongArray(env, ckpKeyHandles, 2);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Copyright (c) 2002 Graz University of Technology. All rights reserved.
|
/* Copyright (c) 2002 Graz University of Technology. All rights reserved.
|
||||||
@ -1143,3 +1143,15 @@ void p11free(void *p, char *file, int line) {
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// prints a message to stdout if debug output is enabled
|
||||||
|
void printDebug(const char *format, ...) {
|
||||||
|
if (debug == JNI_TRUE) {
|
||||||
|
va_list args;
|
||||||
|
fprintf(stdout, "sunpkcs11: ");
|
||||||
|
va_start(args, format);
|
||||||
|
vfprintf(stdout, format, args);
|
||||||
|
va_end(args);
|
||||||
|
fflush(stdout);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Copyright (c) 2002 Graz University of Technology. All rights reserved.
|
/* Copyright (c) 2002 Graz University of Technology. All rights reserved.
|
||||||
@ -159,6 +159,7 @@
|
|||||||
#include "pkcs-11v2-20a3.h"
|
#include "pkcs-11v2-20a3.h"
|
||||||
#include <jni.h>
|
#include <jni.h>
|
||||||
#include <jni_util.h>
|
#include <jni_util.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
#define MAX_STACK_BUFFER_LEN (4 * 1024)
|
#define MAX_STACK_BUFFER_LEN (4 * 1024)
|
||||||
#define MAX_HEAP_BUFFER_LEN (64 * 1024)
|
#define MAX_HEAP_BUFFER_LEN (64 * 1024)
|
||||||
@ -217,6 +218,10 @@
|
|||||||
#define TRACE_UNINTEND
|
#define TRACE_UNINTEND
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* debug output */
|
||||||
|
extern jboolean debug;
|
||||||
|
void printDebug(const char *format, ...);
|
||||||
|
|
||||||
#define CK_ASSERT_OK 0L
|
#define CK_ASSERT_OK 0L
|
||||||
|
|
||||||
#define CLASS_INFO "sun/security/pkcs11/wrapper/CK_INFO"
|
#define CLASS_INFO "sun/security/pkcs11/wrapper/CK_INFO"
|
||||||
|
@ -54,8 +54,8 @@ class JImageTask {
|
|||||||
}, "--dir"),
|
}, "--dir"),
|
||||||
|
|
||||||
new Option<JImageTask>(true, (task, option, arg) -> {
|
new Option<JImageTask>(true, (task, option, arg) -> {
|
||||||
task.options.filters = arg;
|
task.options.include = arg;
|
||||||
}, "--filter"),
|
}, "--include"),
|
||||||
|
|
||||||
new Option<JImageTask>(false, (task, option, arg) -> {
|
new Option<JImageTask>(false, (task, option, arg) -> {
|
||||||
task.options.fullVersion = true;
|
task.options.fullVersion = true;
|
||||||
@ -81,12 +81,12 @@ class JImageTask {
|
|||||||
private static final FileSystem JRT_FILE_SYSTEM = Utils.jrtFileSystem();
|
private static final FileSystem JRT_FILE_SYSTEM = Utils.jrtFileSystem();
|
||||||
|
|
||||||
private final OptionsValues options;
|
private final OptionsValues options;
|
||||||
private final List<Predicate<String>> filterPredicates;
|
private final List<Predicate<String>> includePredicates;
|
||||||
private PrintWriter log;
|
private PrintWriter log;
|
||||||
|
|
||||||
JImageTask() {
|
JImageTask() {
|
||||||
this.options = new OptionsValues();
|
this.options = new OptionsValues();
|
||||||
this.filterPredicates = new ArrayList<>();
|
this.includePredicates = new ArrayList<>();
|
||||||
log = null;
|
log = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ class JImageTask {
|
|||||||
static class OptionsValues {
|
static class OptionsValues {
|
||||||
Task task = Task.LIST;
|
Task task = Task.LIST;
|
||||||
String directory = ".";
|
String directory = ".";
|
||||||
String filters = "";
|
String include = "";
|
||||||
boolean fullVersion;
|
boolean fullVersion;
|
||||||
boolean help;
|
boolean help;
|
||||||
boolean verbose;
|
boolean verbose;
|
||||||
@ -200,6 +200,8 @@ class JImageTask {
|
|||||||
|
|
||||||
log.println(TASK_HELPER.getMessage("main.opt." + name));
|
log.println(TASK_HELPER.getMessage("main.opt." + name));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.println(TASK_HELPER.getMessage("main.opt.footer"));
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
log.println(TASK_HELPER.getMessage("main.usage." +
|
log.println(TASK_HELPER.getMessage("main.usage." +
|
||||||
@ -219,7 +221,7 @@ class JImageTask {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
processFilter(options.filters);
|
processInclude(options.include);
|
||||||
|
|
||||||
return run() ? EXIT_OK : EXIT_ERROR;
|
return run() ? EXIT_OK : EXIT_ERROR;
|
||||||
} catch (BadArgs e) {
|
} catch (BadArgs e) {
|
||||||
@ -239,15 +241,15 @@ class JImageTask {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void processFilter(String filters) {
|
private void processInclude(String include) {
|
||||||
if (filters.isEmpty()) {
|
if (include.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (String filter : filters.split(",")) {
|
for (String filter : include.split(",")) {
|
||||||
final PathMatcher matcher = Utils.getPathMatcher(JRT_FILE_SYSTEM, filter);
|
final PathMatcher matcher = Utils.getPathMatcher(JRT_FILE_SYSTEM, filter);
|
||||||
Predicate<String> predicate = (path) -> matcher.matches(JRT_FILE_SYSTEM.getPath(path));
|
Predicate<String> predicate = (path) -> matcher.matches(JRT_FILE_SYSTEM.getPath(path));
|
||||||
filterPredicates.add(predicate);
|
includePredicates.add(predicate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -388,9 +390,9 @@ class JImageTask {
|
|||||||
String oldModule = "";
|
String oldModule = "";
|
||||||
|
|
||||||
for (String name : entryNames) {
|
for (String name : entryNames) {
|
||||||
boolean match = filterPredicates.isEmpty();
|
boolean match = includePredicates.isEmpty();
|
||||||
|
|
||||||
for (Predicate<String> predicate : filterPredicates) {
|
for (Predicate<String> predicate : includePredicates) {
|
||||||
if (predicate.test(name)) {
|
if (predicate.test(name)) {
|
||||||
match = true;
|
match = true;
|
||||||
break;
|
break;
|
||||||
|
@ -62,9 +62,19 @@ warn.prefix=Warning:
|
|||||||
main.opt.dir=\
|
main.opt.dir=\
|
||||||
\ --dir Target directory for extract directive
|
\ --dir Target directory for extract directive
|
||||||
|
|
||||||
main.opt.filter=\
|
main.opt.include=\
|
||||||
\ --filter Filter entries for list or extract\n\
|
\ --include <pattern-list> Pattern list for filtering list or extract entries.
|
||||||
\ Ex. /java.base/*, */module-info.class
|
|
||||||
|
main.opt.footer=\
|
||||||
|
\n\
|
||||||
|
\For options requiring a <pattern-list>, the value will be a comma\
|
||||||
|
\ separated list of elements each using one the following forms:\n\
|
||||||
|
\ <glob-pattern>\n\
|
||||||
|
\ glob:<glob-pattern>\n\
|
||||||
|
\ regex:<regex-pattern>\n\
|
||||||
|
\ @<filename> where filename is the name of a file containing patterns to be\
|
||||||
|
\ used, one pattern per line\n\
|
||||||
|
|
||||||
|
|
||||||
main.opt.fullversion=\
|
main.opt.fullversion=\
|
||||||
\ --fullversion Print full version information
|
\ --fullversion Print full version information
|
||||||
|
@ -25,9 +25,7 @@
|
|||||||
|
|
||||||
package jdk.tools.jlink.internal;
|
package jdk.tools.jlink.internal;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.UncheckedIOException;
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import jdk.tools.jlink.plugin.ModuleEntry;
|
import jdk.tools.jlink.plugin.ModuleEntry;
|
||||||
|
|
||||||
@ -44,103 +42,39 @@ import jdk.tools.jlink.plugin.ModuleEntry;
|
|||||||
* {@literal bin|conf|native}/{dir1}>/.../{dirN}/{file name}</li>
|
* {@literal bin|conf|native}/{dir1}>/.../{dirN}/{file name}</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
*/
|
*/
|
||||||
public class ModuleEntryImpl implements ModuleEntry {
|
abstract class AbstractModuleEntry implements ModuleEntry {
|
||||||
|
|
||||||
private final Type type;
|
|
||||||
private final String path;
|
private final String path;
|
||||||
private final String module;
|
private final String module;
|
||||||
private final long length;
|
private final Type type;
|
||||||
private final InputStream stream;
|
|
||||||
private byte[] buffer;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new LinkModuleEntry.
|
* Create a new AbstractModuleEntry.
|
||||||
*
|
*
|
||||||
* @param module The module name.
|
* @param module The module name.
|
||||||
* @param path The data path identifier.
|
* @param path The data path identifier.
|
||||||
* @param type The data type.
|
* @param type The data type.
|
||||||
* @param stream The data content stream.
|
|
||||||
* @param length The stream length.
|
|
||||||
*/
|
*/
|
||||||
public ModuleEntryImpl(String module, String path, Type type, InputStream stream, long length) {
|
AbstractModuleEntry(String module, String path, Type type) {
|
||||||
Objects.requireNonNull(module);
|
this.module = Objects.requireNonNull(module);
|
||||||
Objects.requireNonNull(path);
|
this.path = Objects.requireNonNull(path);
|
||||||
Objects.requireNonNull(type);
|
this.type = Objects.requireNonNull(type);
|
||||||
Objects.requireNonNull(stream);
|
|
||||||
this.path = path;
|
|
||||||
this.type = type;
|
|
||||||
this.module = module;
|
|
||||||
this.stream = stream;
|
|
||||||
this.length = length;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* The LinkModuleEntry module name.
|
|
||||||
*
|
|
||||||
* @return The module name.
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public final String getModule() {
|
public final String getModule() {
|
||||||
return module;
|
return module;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* The LinkModuleEntry path.
|
|
||||||
*
|
|
||||||
* @return The module path.
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public final String getPath() {
|
public final String getPath() {
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* The LinkModuleEntry's type.
|
|
||||||
*
|
|
||||||
* @return The data type.
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public final Type getType() {
|
public final Type getType() {
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* The LinkModuleEntry content as an array of byte.
|
|
||||||
*
|
|
||||||
* @return An Array of bytes.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public byte[] getBytes() {
|
|
||||||
if (buffer == null) {
|
|
||||||
try (InputStream is = stream) {
|
|
||||||
buffer = is.readAllBytes();
|
|
||||||
} catch (IOException ex) {
|
|
||||||
throw new UncheckedIOException(ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return buffer;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The LinkModuleEntry content length.
|
|
||||||
*
|
|
||||||
* @return The length.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public long getLength() {
|
|
||||||
return length;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The LinkModuleEntry stream.
|
|
||||||
*
|
|
||||||
* @return The module data stream.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public InputStream stream() {
|
|
||||||
return stream;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
int hash = 7;
|
int hash = 7;
|
||||||
@ -150,10 +84,10 @@ public class ModuleEntryImpl implements ModuleEntry {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object other) {
|
public boolean equals(Object other) {
|
||||||
if (!(other instanceof ModuleEntryImpl)) {
|
if (!(other instanceof AbstractModuleEntry)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ModuleEntryImpl f = (ModuleEntryImpl) other;
|
AbstractModuleEntry f = (AbstractModuleEntry) other;
|
||||||
return f.path.equals(path);
|
return f.path.equals(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -161,4 +95,4 @@ public class ModuleEntryImpl implements ModuleEntry {
|
|||||||
public String toString() {
|
public String toString() {
|
||||||
return getPath();
|
return getPath();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -0,0 +1,82 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 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
|
||||||
|
* under the terms of the GNU General Public License version 2 only, as
|
||||||
|
* published by the Free Software Foundation. Oracle designates this
|
||||||
|
* particular file as subject to the "Classpath" exception as provided
|
||||||
|
* by Oracle in the LICENSE file that accompanied this code.
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package jdk.tools.jlink.internal;
|
||||||
|
|
||||||
|
import java.io.ByteArrayInputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.io.UncheckedIOException;
|
||||||
|
import java.util.Objects;
|
||||||
|
import jdk.tools.jlink.plugin.ModuleEntry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A ModuleEntry backed by a given Archive Entry.
|
||||||
|
*/
|
||||||
|
final class ArchiveEntryModuleEntry extends AbstractModuleEntry {
|
||||||
|
private final Archive.Entry entry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new ArchiveModuleEntry.
|
||||||
|
*
|
||||||
|
* @param module The module name.
|
||||||
|
* @param path The data path identifier.
|
||||||
|
* @param entry The archive Entry.
|
||||||
|
*/
|
||||||
|
ArchiveEntryModuleEntry(String module, String path, Archive.Entry entry) {
|
||||||
|
super(module, path, getImageFileType(entry));
|
||||||
|
this.entry = entry;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public InputStream stream() {
|
||||||
|
try {
|
||||||
|
return entry.stream();
|
||||||
|
} catch (IOException ex) {
|
||||||
|
throw new UncheckedIOException(ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getLength() {
|
||||||
|
return entry.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static ModuleEntry.Type getImageFileType(Archive.Entry entry) {
|
||||||
|
Objects.requireNonNull(entry);
|
||||||
|
switch(entry.type()) {
|
||||||
|
case CLASS_OR_RESOURCE:
|
||||||
|
return ModuleEntry.Type.CLASS_OR_RESOURCE;
|
||||||
|
case CONFIG:
|
||||||
|
return ModuleEntry.Type.CONFIG;
|
||||||
|
case NATIVE_CMD:
|
||||||
|
return ModuleEntry.Type.NATIVE_CMD;
|
||||||
|
case NATIVE_LIB:
|
||||||
|
return ModuleEntry.Type.NATIVE_LIB;
|
||||||
|
default:
|
||||||
|
return ModuleEntry.Type.OTHER;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,78 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 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
|
||||||
|
* under the terms of the GNU General Public License version 2 only, as
|
||||||
|
* published by the Free Software Foundation. Oracle designates this
|
||||||
|
* particular file as subject to the "Classpath" exception as provided
|
||||||
|
* by Oracle in the LICENSE file that accompanied this code.
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package jdk.tools.jlink.internal;
|
||||||
|
|
||||||
|
import java.io.ByteArrayInputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.io.OutputStream;
|
||||||
|
import java.io.UncheckedIOException;
|
||||||
|
import java.util.Objects;
|
||||||
|
import jdk.tools.jlink.plugin.ModuleEntry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A ModuleEntry backed by a given byte[].
|
||||||
|
*/
|
||||||
|
class ByteArrayModuleEntry extends AbstractModuleEntry {
|
||||||
|
private final byte[] buffer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new ByteArrayModuleEntry.
|
||||||
|
*
|
||||||
|
* @param module The module name.
|
||||||
|
* @param path The data path identifier.
|
||||||
|
* @param type The data type.
|
||||||
|
* @param buf The byte buffer.
|
||||||
|
*/
|
||||||
|
ByteArrayModuleEntry(String module, String path, Type type, byte[] buffer) {
|
||||||
|
super(module, path, type);
|
||||||
|
this.buffer = Objects.requireNonNull(buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public byte[] getBytes() {
|
||||||
|
return buffer.clone();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public InputStream stream() {
|
||||||
|
return new ByteArrayInputStream(buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void write(OutputStream out) {
|
||||||
|
try {
|
||||||
|
out.write(buffer);
|
||||||
|
} catch (IOException ex) {
|
||||||
|
throw new UncheckedIOException(ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getLength() {
|
||||||
|
return buffer.length;
|
||||||
|
}
|
||||||
|
}
|
@ -233,8 +233,7 @@ public final class ImageFileCreator {
|
|||||||
|
|
||||||
// write module content
|
// write module content
|
||||||
for (ModuleEntry res : content) {
|
for (ModuleEntry res : content) {
|
||||||
byte[] buf = res.getBytes();
|
res.write(out);
|
||||||
out.write(buf, 0, buf.length);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tree.addContent(out);
|
tree.addContent(out);
|
||||||
@ -244,21 +243,6 @@ public final class ImageFileCreator {
|
|||||||
return resultResources;
|
return resultResources;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ModuleEntry.Type mapImageFileType(EntryType type) {
|
|
||||||
switch(type) {
|
|
||||||
case CONFIG: {
|
|
||||||
return ModuleEntry.Type.CONFIG;
|
|
||||||
}
|
|
||||||
case NATIVE_CMD: {
|
|
||||||
return ModuleEntry.Type.NATIVE_CMD;
|
|
||||||
}
|
|
||||||
case NATIVE_LIB: {
|
|
||||||
return ModuleEntry.Type.NATIVE_LIB;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static ModulePoolImpl createPools(Set<Archive> archives,
|
private static ModulePoolImpl createPools(Set<Archive> archives,
|
||||||
Map<String, List<Entry>> entriesForModule,
|
Map<String, List<Entry>> entriesForModule,
|
||||||
ByteOrder byteOrder,
|
ByteOrder byteOrder,
|
||||||
@ -278,34 +262,22 @@ public final class ImageFileCreator {
|
|||||||
for (Archive archive : archives) {
|
for (Archive archive : archives) {
|
||||||
String mn = archive.moduleName();
|
String mn = archive.moduleName();
|
||||||
for (Entry entry : entriesForModule.get(mn)) {
|
for (Entry entry : entriesForModule.get(mn)) {
|
||||||
|
String path;
|
||||||
if (entry.type() == EntryType.CLASS_OR_RESOURCE) {
|
if (entry.type() == EntryType.CLASS_OR_RESOURCE) {
|
||||||
// Removal of "classes/" radical.
|
// Removal of "classes/" radical.
|
||||||
String path = entry.name();
|
path = entry.name();
|
||||||
try (InputStream stream = entry.stream()) {
|
if (path.endsWith("module-info.class")) {
|
||||||
byte[] bytes = readAllBytes(stream);
|
path = "/" + path;
|
||||||
if (path.endsWith("module-info.class")) {
|
} else {
|
||||||
path = "/" + path;
|
path = "/" + mn + "/" + path;
|
||||||
} else {
|
|
||||||
path = "/" + mn + "/" + path;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
resources.add(ModuleEntry.create(path, bytes));
|
|
||||||
} catch (Exception ex) {
|
|
||||||
throw new IOException(ex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
try {
|
// Entry.path() contains the kind of file native, conf, bin, ...
|
||||||
// Entry.path() contains the kind of file native, conf, bin, ...
|
// Keep it to avoid naming conflict (eg: native/jvm.cfg and config/jvm.cfg
|
||||||
// Keep it to avoid naming conflict (eg: native/jvm.cfg and config/jvm.cfg
|
path = "/" + mn + "/" + entry.path();
|
||||||
resources.add(ModuleEntry.create(mn,
|
|
||||||
"/" + mn + "/" + entry.path(), mapImageFileType(entry.type()),
|
|
||||||
entry.stream(), entry.size()));
|
|
||||||
} catch (Exception ex) {
|
|
||||||
throw new IOException(ex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resources.add(new ArchiveEntryModuleEntry(mn, path, entry));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return resources;
|
return resources;
|
||||||
|
@ -101,7 +101,7 @@ public final class ImagePluginConfiguration {
|
|||||||
List<Plugin> orderedPlugins = PluginOrderingGraph.sort(entry.getValue());
|
List<Plugin> orderedPlugins = PluginOrderingGraph.sort(entry.getValue());
|
||||||
Category category = entry.getKey();
|
Category category = entry.getKey();
|
||||||
for (Plugin p : orderedPlugins) {
|
for (Plugin p : orderedPlugins) {
|
||||||
if (Utils.isPostProcessor(category)) {
|
if (category.isPostProcessor()) {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
PostProcessorPlugin pp = (PostProcessorPlugin) p;
|
PostProcessorPlugin pp = (PostProcessorPlugin) p;
|
||||||
postProcessingPlugins.add(pp);
|
postProcessingPlugins.add(pp);
|
||||||
|
@ -443,9 +443,7 @@ public final class ImagePluginStack {
|
|||||||
byte[] bytes = decompressor.decompressResource(getByteOrder(),
|
byte[] bytes = decompressor.decompressResource(getByteOrder(),
|
||||||
(int offset) -> pool.getStringTable().getString(offset),
|
(int offset) -> pool.getStringTable().getString(offset),
|
||||||
res.getBytes());
|
res.getBytes());
|
||||||
res = ModuleEntry.create(res.getPath(),
|
res = res.create(bytes);
|
||||||
new ByteArrayInputStream(bytes),
|
|
||||||
bytes.length);
|
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
throw new PluginException(ex);
|
throw new PluginException(ex);
|
||||||
}
|
}
|
||||||
|
@ -39,15 +39,7 @@ import java.nio.ByteOrder;
|
|||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.util.Date;
|
import java.util.*;
|
||||||
import java.util.Formatter;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.Optional;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import jdk.internal.module.ConfigurableModuleFinder;
|
import jdk.internal.module.ConfigurableModuleFinder;
|
||||||
@ -96,11 +88,9 @@ public class JlinkTask {
|
|||||||
}, "--help"),
|
}, "--help"),
|
||||||
new Option<JlinkTask>(true, (task, opt, arg) -> {
|
new Option<JlinkTask>(true, (task, opt, arg) -> {
|
||||||
String[] dirs = arg.split(File.pathSeparator);
|
String[] dirs = arg.split(File.pathSeparator);
|
||||||
task.options.modulePath = new Path[dirs.length];
|
Arrays.stream(dirs)
|
||||||
int i = 0;
|
.map(Paths::get)
|
||||||
for (String dir : dirs) {
|
.forEach(task.options.modulePath::add);
|
||||||
task.options.modulePath[i++] = Paths.get(dir);
|
|
||||||
}
|
|
||||||
}, "--modulepath", "--mp"),
|
}, "--modulepath", "--mp"),
|
||||||
new Option<JlinkTask>(true, (task, opt, arg) -> {
|
new Option<JlinkTask>(true, (task, opt, arg) -> {
|
||||||
for (String mn : arg.split(",")) {
|
for (String mn : arg.split(",")) {
|
||||||
@ -176,7 +166,7 @@ public class JlinkTask {
|
|||||||
String saveoptsfile;
|
String saveoptsfile;
|
||||||
boolean version;
|
boolean version;
|
||||||
boolean fullVersion;
|
boolean fullVersion;
|
||||||
Path[] modulePath;
|
List<Path> modulePath = new ArrayList<>();
|
||||||
Set<String> limitMods = new HashSet<>();
|
Set<String> limitMods = new HashSet<>();
|
||||||
Set<String> addMods = new HashSet<>();
|
Set<String> addMods = new HashSet<>();
|
||||||
Path output;
|
Path output;
|
||||||
@ -186,7 +176,7 @@ public class JlinkTask {
|
|||||||
|
|
||||||
int run(String[] args) {
|
int run(String[] args) {
|
||||||
if (log == null) {
|
if (log == null) {
|
||||||
setLog(new PrintWriter(System.err, true));
|
setLog(new PrintWriter(System.out, true));
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
optionsHelper.handleOptions(this, args);
|
optionsHelper.handleOptions(this, args);
|
||||||
@ -203,7 +193,7 @@ public class JlinkTask {
|
|||||||
return EXIT_OK;
|
return EXIT_OK;
|
||||||
}
|
}
|
||||||
if (taskHelper.getExistingImage() == null) {
|
if (taskHelper.getExistingImage() == null) {
|
||||||
if (options.modulePath == null || options.modulePath.length == 0) {
|
if (options.modulePath == null || options.modulePath.isEmpty()) {
|
||||||
throw taskHelper.newBadArgs("err.modulepath.must.be.specified").showUsage(true);
|
throw taskHelper.newBadArgs("err.modulepath.must.be.specified").showUsage(true);
|
||||||
}
|
}
|
||||||
createImage();
|
createImage();
|
||||||
@ -245,7 +235,7 @@ public class JlinkTask {
|
|||||||
* Jlink API entry point.
|
* Jlink API entry point.
|
||||||
*/
|
*/
|
||||||
public static void createImage(JlinkConfiguration config,
|
public static void createImage(JlinkConfiguration config,
|
||||||
PluginsConfiguration plugins)
|
PluginsConfiguration plugins)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
Objects.requireNonNull(config);
|
Objects.requireNonNull(config);
|
||||||
Objects.requireNonNull(config.getOutput());
|
Objects.requireNonNull(config.getOutput());
|
||||||
@ -254,10 +244,9 @@ public class JlinkTask {
|
|||||||
if (config.getModulepaths().isEmpty()) {
|
if (config.getModulepaths().isEmpty()) {
|
||||||
throw new Exception("Empty module paths");
|
throw new Exception("Empty module paths");
|
||||||
}
|
}
|
||||||
Path[] arr = new Path[config.getModulepaths().size()];
|
|
||||||
arr = config.getModulepaths().toArray(arr);
|
|
||||||
ModuleFinder finder
|
ModuleFinder finder
|
||||||
= newModuleFinder(arr, config.getLimitmods(), config.getModules());
|
= newModuleFinder(config.getModulepaths(), config.getLimitmods(), config.getModules());
|
||||||
|
|
||||||
// First create the image provider
|
// First create the image provider
|
||||||
ImageProvider imageProvider
|
ImageProvider imageProvider
|
||||||
@ -332,10 +321,12 @@ public class JlinkTask {
|
|||||||
return addMods;
|
return addMods;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ModuleFinder newModuleFinder(Path[] paths,
|
public static ModuleFinder newModuleFinder(List<Path> paths,
|
||||||
Set<String> limitMods,
|
Set<String> limitMods,
|
||||||
Set<String> addMods) {
|
Set<String> addMods)
|
||||||
ModuleFinder finder = ModuleFinder.of(paths);
|
{
|
||||||
|
|
||||||
|
ModuleFinder finder = ModuleFinder.of(paths.toArray(new Path[0]));
|
||||||
|
|
||||||
// jmods are located at link-time
|
// jmods are located at link-time
|
||||||
if (finder instanceof ConfigurableModuleFinder) {
|
if (finder instanceof ConfigurableModuleFinder) {
|
||||||
|
@ -0,0 +1,67 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 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
|
||||||
|
* under the terms of the GNU General Public License version 2 only, as
|
||||||
|
* published by the Free Software Foundation. Oracle designates this
|
||||||
|
* particular file as subject to the "Classpath" exception as provided
|
||||||
|
* by Oracle in the LICENSE file that accompanied this code.
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
package jdk.tools.jlink.internal;
|
||||||
|
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.nio.file.Path;
|
||||||
|
import java.util.Objects;
|
||||||
|
import jdk.tools.jlink.plugin.ModuleEntry;
|
||||||
|
|
||||||
|
public final class ModuleEntryFactory {
|
||||||
|
private ModuleEntryFactory() {}
|
||||||
|
|
||||||
|
public static ModuleEntry create(String path,
|
||||||
|
ModuleEntry.Type type, byte[] content) {
|
||||||
|
return new ByteArrayModuleEntry(moduleFrom(path), path, type, content);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ModuleEntry create(String path,
|
||||||
|
ModuleEntry.Type type, Path file) {
|
||||||
|
return new PathModuleEntry(moduleFrom(path), path, type, file);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ModuleEntry create(ModuleEntry original, byte[] content) {
|
||||||
|
return new ByteArrayModuleEntry(original.getModule(),
|
||||||
|
original.getPath(), original.getType(), content);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ModuleEntry create(ModuleEntry original, Path file) {
|
||||||
|
return new PathModuleEntry(original.getModule(),
|
||||||
|
original.getPath(), original.getType(), file);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String moduleFrom(String path) {
|
||||||
|
Objects.requireNonNull(path);
|
||||||
|
if (path.isEmpty() || path.charAt(0) != '/') {
|
||||||
|
throw new IllegalArgumentException(path + " must start with /");
|
||||||
|
}
|
||||||
|
String noRoot = path.substring(1);
|
||||||
|
int idx = noRoot.indexOf('/');
|
||||||
|
if (idx == -1) {
|
||||||
|
throw new IllegalArgumentException("/ missing after module: " + path);
|
||||||
|
}
|
||||||
|
return noRoot.substring(0, idx);
|
||||||
|
}
|
||||||
|
}
|
@ -95,7 +95,7 @@ public class ModulePoolImpl implements ModulePool {
|
|||||||
@Override
|
@Override
|
||||||
public void add(ModuleEntry data) {
|
public void add(ModuleEntry data) {
|
||||||
if (isReadOnly()) {
|
if (isReadOnly()) {
|
||||||
throw new PluginException("LinkConfiguration is readonly");
|
throw new PluginException("ModulePool is readonly");
|
||||||
}
|
}
|
||||||
Objects.requireNonNull(data);
|
Objects.requireNonNull(data);
|
||||||
if (!data.getModule().equals(name)) {
|
if (!data.getModule().equals(name)) {
|
||||||
@ -180,7 +180,7 @@ public class ModulePoolImpl implements ModulePool {
|
|||||||
@Override
|
@Override
|
||||||
public void add(ModuleEntry data) {
|
public void add(ModuleEntry data) {
|
||||||
if (isReadOnly()) {
|
if (isReadOnly()) {
|
||||||
throw new PluginException("LinkConfiguration is readonly");
|
throw new PluginException("ModulePool is readonly");
|
||||||
}
|
}
|
||||||
Objects.requireNonNull(data);
|
Objects.requireNonNull(data);
|
||||||
if (resources.get(data.getPath()) != null) {
|
if (resources.get(data.getPath()) != null) {
|
||||||
@ -215,7 +215,7 @@ public class ModulePoolImpl implements ModulePool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The stream of modules contained in this LinkConfiguration.
|
* The stream of modules contained in this ModulePool.
|
||||||
*
|
*
|
||||||
* @return The stream of modules.
|
* @return The stream of modules.
|
||||||
*/
|
*/
|
||||||
@ -225,7 +225,7 @@ public class ModulePoolImpl implements ModulePool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the number of LinkModule count in this LinkConfiguration.
|
* Return the number of LinkModule count in this ModulePool.
|
||||||
*
|
*
|
||||||
* @return the module count.
|
* @return the module count.
|
||||||
*/
|
*/
|
||||||
@ -235,7 +235,7 @@ public class ModulePoolImpl implements ModulePool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all ModuleEntry contained in this LinkConfiguration instance.
|
* Get all ModuleEntry contained in this ModulePool instance.
|
||||||
*
|
*
|
||||||
* @return The stream of LinkModuleEntries.
|
* @return The stream of LinkModuleEntries.
|
||||||
*/
|
*/
|
||||||
@ -245,7 +245,7 @@ public class ModulePoolImpl implements ModulePool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the number of ModuleEntry count in this LinkConfiguration.
|
* Return the number of ModuleEntry count in this ModulePool.
|
||||||
*
|
*
|
||||||
* @return the entry count.
|
* @return the entry count.
|
||||||
*/
|
*/
|
||||||
@ -267,7 +267,7 @@ public class ModulePoolImpl implements ModulePool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the LinkConfiguration contains the given ModuleEntry.
|
* Check if the ModulePool contains the given ModuleEntry.
|
||||||
*
|
*
|
||||||
* @param data The module data to check existence for.
|
* @param data The module data to check existence for.
|
||||||
* @return The module data or null if not found.
|
* @return The module data or null if not found.
|
||||||
@ -279,7 +279,7 @@ public class ModulePoolImpl implements ModulePool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the LinkConfiguration contains some content at all.
|
* Check if the ModulePool contains some content at all.
|
||||||
*
|
*
|
||||||
* @return True, no content, false otherwise.
|
* @return True, no content, false otherwise.
|
||||||
*/
|
*/
|
||||||
@ -289,16 +289,16 @@ public class ModulePoolImpl implements ModulePool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Visit each ModuleEntry in this LinkConfiguration to transform it and
|
* Visit each ModuleEntry in this ModulePool to transform it and
|
||||||
* copy the transformed ModuleEntry to the output LinkConfiguration.
|
* copy the transformed ModuleEntry to the output ModulePool.
|
||||||
*
|
*
|
||||||
* @param transform The function called for each ModuleEntry found in
|
* @param transform The function called for each ModuleEntry found in
|
||||||
* the LinkConfiguration. The transform function should return a
|
* the ModulePool. The transform function should return a
|
||||||
* ModuleEntry instance which will be added to the output or it should
|
* ModuleEntry instance which will be added to the output or it should
|
||||||
* return null if the passed ModuleEntry is to be ignored for the
|
* return null if the passed ModuleEntry is to be ignored for the
|
||||||
* output.
|
* output.
|
||||||
*
|
*
|
||||||
* @param output The LinkConfiguration to be filled with Visitor returned
|
* @param output The ModulePool to be filled with Visitor returned
|
||||||
* ModuleEntry.
|
* ModuleEntry.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@ -351,14 +351,13 @@ public class ModulePoolImpl implements ModulePool {
|
|||||||
/**
|
/**
|
||||||
* A resource that has been compressed.
|
* A resource that has been compressed.
|
||||||
*/
|
*/
|
||||||
public static final class CompressedModuleData extends ModuleEntryImpl {
|
public static final class CompressedModuleData extends ByteArrayModuleEntry {
|
||||||
|
|
||||||
final long uncompressed_size;
|
final long uncompressed_size;
|
||||||
|
|
||||||
private CompressedModuleData(String module, String path,
|
private CompressedModuleData(String module, String path,
|
||||||
InputStream stream, long size,
|
byte[] content, long uncompressed_size) {
|
||||||
long uncompressed_size) {
|
super(module, path, ModuleEntry.Type.CLASS_OR_RESOURCE, content);
|
||||||
super(module, path, ModuleEntry.Type.CLASS_OR_RESOURCE, stream, size);
|
|
||||||
this.uncompressed_size = uncompressed_size;
|
this.uncompressed_size = uncompressed_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -413,8 +412,7 @@ public class ModulePoolImpl implements ModulePool {
|
|||||||
|
|
||||||
CompressedModuleData compressedResource
|
CompressedModuleData compressedResource
|
||||||
= new CompressedModuleData(original.getModule(), original.getPath(),
|
= new CompressedModuleData(original.getModule(), original.getPath(),
|
||||||
new ByteArrayInputStream(contentWithHeader),
|
contentWithHeader, uncompressed_size);
|
||||||
contentWithHeader.length, uncompressed_size);
|
|
||||||
return compressedResource;
|
return compressedResource;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,75 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 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
|
||||||
|
* under the terms of the GNU General Public License version 2 only, as
|
||||||
|
* published by the Free Software Foundation. Oracle designates this
|
||||||
|
* particular file as subject to the "Classfile" exception as provided
|
||||||
|
* by Oracle in the LICENSE file that accompanied this code.
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package jdk.tools.jlink.internal;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.io.UncheckedIOException;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
import java.nio.file.Path;
|
||||||
|
import java.util.Objects;
|
||||||
|
import jdk.tools.jlink.plugin.ModuleEntry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A ModuleEntry backed by a given nio Path.
|
||||||
|
*/
|
||||||
|
public class PathModuleEntry extends AbstractModuleEntry {
|
||||||
|
private final Path file;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new PathModuleEntry.
|
||||||
|
*
|
||||||
|
* @param module The module name.
|
||||||
|
* @param file The data file identifier.
|
||||||
|
* @param type The data type.
|
||||||
|
* @param file The Path for the resource content.
|
||||||
|
*/
|
||||||
|
public PathModuleEntry(String module, String path, Type type, Path file) {
|
||||||
|
super(module, path, type);
|
||||||
|
this.file = Objects.requireNonNull(file);
|
||||||
|
if (!Files.isRegularFile(file)) {
|
||||||
|
throw new IllegalArgumentException(file + " not a file");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final InputStream stream() {
|
||||||
|
try {
|
||||||
|
return Files.newInputStream(file);
|
||||||
|
} catch (IOException ex) {
|
||||||
|
throw new UncheckedIOException(ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final long getLength() {
|
||||||
|
try {
|
||||||
|
return Files.size(file);
|
||||||
|
} catch (IOException ex) {
|
||||||
|
throw new UncheckedIOException(ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -584,6 +584,8 @@ public final class TaskHelper {
|
|||||||
showPlugin(plugin, log, showsImageBuilder);
|
showPlugin(plugin, log, showsImageBuilder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.println("\n" + bundleHelper.getMessage("main.extended.help.footer"));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showPlugin(Plugin plugin, PrintWriter log, boolean showsImageBuilder) {
|
private void showPlugin(Plugin plugin, PrintWriter log, boolean showsImageBuilder) {
|
||||||
|
@ -35,7 +35,6 @@ import java.util.Arrays;
|
|||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Set;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import jdk.tools.jlink.plugin.Plugin;
|
import jdk.tools.jlink.plugin.Plugin;
|
||||||
import jdk.tools.jlink.plugin.Plugin.Category;
|
import jdk.tools.jlink.plugin.Plugin.Category;
|
||||||
@ -57,46 +56,16 @@ public class Utils {
|
|||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isPostProcessor(Category category) {
|
|
||||||
return category.equals(Category.VERIFIER)
|
|
||||||
|| category.equals(Category.PROCESSOR)
|
|
||||||
|| category.equals(Category.PACKAGER);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean isPreProcessor(Category category) {
|
|
||||||
return category.equals(Category.COMPRESSOR)
|
|
||||||
|| category.equals(Category.FILTER)
|
|
||||||
|| category.equals(Category.MODULEINFO_TRANSFORMER)
|
|
||||||
|| category.equals(Category.SORTER)
|
|
||||||
|| category.equals(Category.TRANSFORMER)
|
|
||||||
|| category.equals(Category.METAINFO_ADDER);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean isPostProcessor(Plugin provider) {
|
public static boolean isPostProcessor(Plugin provider) {
|
||||||
Set<Category> types = provider.getType();
|
return provider.getType().isPostProcessor();
|
||||||
Objects.requireNonNull(types);
|
|
||||||
for (Category pt : types) {
|
|
||||||
return isPostProcessor(pt);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isPreProcessor(Plugin provider) {
|
public static boolean isPreProcessor(Plugin provider) {
|
||||||
Set<Category> types = provider.getType();
|
return !isPostProcessor(provider);
|
||||||
Objects.requireNonNull(types);
|
|
||||||
for (Category pt : types) {
|
|
||||||
return isPreProcessor(pt);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Category getCategory(Plugin provider) {
|
public static Category getCategory(Plugin provider) {
|
||||||
Set<Category> types = provider.getType();
|
return provider.getType();
|
||||||
Objects.requireNonNull(types);
|
|
||||||
for (Category t : types) {
|
|
||||||
return t;
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<Plugin> getPreProcessors(List<Plugin> plugins) {
|
public static List<Plugin> getPreProcessors(List<Plugin> plugins) {
|
||||||
|
@ -27,36 +27,19 @@ package jdk.tools.jlink.internal.packager;
|
|||||||
|
|
||||||
|
|
||||||
import jdk.tools.jlink.Jlink;
|
import jdk.tools.jlink.Jlink;
|
||||||
import jdk.tools.jlink.builder.ImageBuilder;
|
import jdk.tools.jlink.builder.DefaultImageBuilder;
|
||||||
|
import jdk.tools.jlink.internal.JlinkTask;
|
||||||
import jdk.tools.jlink.plugin.Plugin;
|
import jdk.tools.jlink.plugin.Plugin;
|
||||||
import jdk.tools.jlink.builder.*;
|
|
||||||
import jdk.tools.jlink.plugin.ModulePool;
|
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.lang.module.ModuleFinder;
|
||||||
import java.io.PrintWriter;
|
|
||||||
import java.io.StringReader;
|
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.nio.file.Paths;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.EnumSet;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.LinkedHashMap;
|
|
||||||
import java.util.LinkedHashSet;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Properties;
|
|
||||||
import java.util.ResourceBundle;
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.StringTokenizer;
|
|
||||||
import java.util.TreeSet;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AppRuntimeImageBuilder is a private API used only by the Java Packager to generate
|
* AppRuntimeImageBuilder is a private API used only by the Java Packager to generate
|
||||||
@ -143,4 +126,14 @@ public final class AppRuntimeImageBuilder {
|
|||||||
Jlink jlink = new Jlink();
|
Jlink jlink = new Jlink();
|
||||||
jlink.build(jlinkConfig, pluginConfig);
|
jlink.build(jlinkConfig, pluginConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a ModuleFinder that limits observability to the given root
|
||||||
|
* modules, their transitive dependences, plus a set of other modules.
|
||||||
|
*/
|
||||||
|
public static ModuleFinder moduleFinder(List<Path> modulepaths,
|
||||||
|
Set<String> roots,
|
||||||
|
Set<String> otherModules) {
|
||||||
|
return JlinkTask.newModuleFinder(modulepaths, roots, otherModules);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,9 +25,7 @@
|
|||||||
package jdk.tools.jlink.internal.plugins;
|
package jdk.tools.jlink.internal.plugins;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import jdk.tools.jlink.internal.ModulePoolImpl;
|
import jdk.tools.jlink.internal.ModulePoolImpl;
|
||||||
import jdk.tools.jlink.plugin.ModulePool;
|
import jdk.tools.jlink.plugin.ModulePool;
|
||||||
@ -77,10 +75,8 @@ public final class DefaultCompressPlugin implements TransformerPlugin, ResourceP
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<Category> getType() {
|
public Category getType() {
|
||||||
Set<Category> set = new HashSet<>();
|
return Category.COMPRESSOR;
|
||||||
set.add(Category.COMPRESSOR);
|
|
||||||
return Collections.unmodifiableSet(set);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -26,9 +26,7 @@ package jdk.tools.jlink.internal.plugins;
|
|||||||
|
|
||||||
import java.io.UncheckedIOException;
|
import java.io.UncheckedIOException;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
import jdk.tools.jlink.plugin.TransformerPlugin;
|
import jdk.tools.jlink.plugin.TransformerPlugin;
|
||||||
import jdk.tools.jlink.plugin.ModulePool;
|
import jdk.tools.jlink.plugin.ModulePool;
|
||||||
@ -60,10 +58,8 @@ public final class ExcludeFilesPlugin implements TransformerPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<Category> getType() {
|
public Category getType() {
|
||||||
Set<Category> set = new HashSet<>();
|
return Category.FILTER;
|
||||||
set.add(Category.FILTER);
|
|
||||||
return Collections.unmodifiableSet(set);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -25,9 +25,7 @@
|
|||||||
package jdk.tools.jlink.internal.plugins;
|
package jdk.tools.jlink.internal.plugins;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
import jdk.tools.jlink.plugin.TransformerPlugin;
|
import jdk.tools.jlink.plugin.TransformerPlugin;
|
||||||
import jdk.tools.jlink.plugin.ModuleEntry;
|
import jdk.tools.jlink.plugin.ModuleEntry;
|
||||||
@ -73,10 +71,8 @@ public final class ExcludePlugin implements TransformerPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<Category> getType() {
|
public Category getType() {
|
||||||
Set<Category> set = new HashSet<>();
|
return Category.FILTER;
|
||||||
set.add(Category.FILTER);
|
|
||||||
return Collections.unmodifiableSet(set);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -32,10 +32,8 @@ import java.io.UncheckedIOException;
|
|||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
|
||||||
import java.util.TreeSet;
|
import java.util.TreeSet;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@ -159,10 +157,8 @@ public final class ExcludeVMPlugin implements TransformerPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<Category> getType() {
|
public Category getType() {
|
||||||
Set<Category> set = new HashSet<>();
|
return Category.FILTER;
|
||||||
set.add(Category.FILTER);
|
|
||||||
return Collections.unmodifiableSet(set);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -248,10 +244,7 @@ public final class ExcludeVMPlugin implements TransformerPlugin {
|
|||||||
|
|
||||||
byte[] content = builder.toString().getBytes(StandardCharsets.UTF_8);
|
byte[] content = builder.toString().getBytes(StandardCharsets.UTF_8);
|
||||||
|
|
||||||
return ModuleEntry.create(orig.getModule(),
|
return orig.create(content);
|
||||||
orig.getPath(),
|
|
||||||
orig.getType(),
|
|
||||||
new ByteArrayInputStream(content), content.length);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String jvmlib() {
|
private static String jvmlib() {
|
||||||
|
@ -36,12 +36,10 @@ import java.nio.file.Paths;
|
|||||||
import java.nio.file.attribute.BasicFileAttributes;
|
import java.nio.file.attribute.BasicFileAttributes;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Set;
|
import jdk.tools.jlink.internal.PathModuleEntry;
|
||||||
import jdk.tools.jlink.internal.ModuleEntryImpl;
|
|
||||||
import jdk.tools.jlink.plugin.PluginException;
|
import jdk.tools.jlink.plugin.PluginException;
|
||||||
import jdk.tools.jlink.plugin.ModuleEntry;
|
import jdk.tools.jlink.plugin.ModuleEntry;
|
||||||
import jdk.tools.jlink.plugin.ModulePool;
|
import jdk.tools.jlink.plugin.ModulePool;
|
||||||
@ -68,13 +66,13 @@ public class FileCopierPlugin implements TransformerPlugin {
|
|||||||
/**
|
/**
|
||||||
* Symbolic link to another path.
|
* Symbolic link to another path.
|
||||||
*/
|
*/
|
||||||
public static abstract class SymImageFile extends ModuleEntryImpl {
|
public static abstract class SymImageFile extends PathModuleEntry {
|
||||||
|
|
||||||
private final String targetPath;
|
private final String targetPath;
|
||||||
|
|
||||||
public SymImageFile(String targetPath, String module, String path,
|
public SymImageFile(String targetPath, String module, String path,
|
||||||
ModuleEntry.Type type, InputStream stream, long size) {
|
ModuleEntry.Type type, Path file) {
|
||||||
super(module, path, type, stream, size);
|
super(module, path, type, file);
|
||||||
this.targetPath = targetPath;
|
this.targetPath = targetPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,23 +85,7 @@ public class FileCopierPlugin implements TransformerPlugin {
|
|||||||
|
|
||||||
public SymImageFileImpl(String targetPath, Path file, String module,
|
public SymImageFileImpl(String targetPath, Path file, String module,
|
||||||
String path, ModuleEntry.Type type) {
|
String path, ModuleEntry.Type type) {
|
||||||
super(targetPath, module, path, type, newStream(file), length(file));
|
super(targetPath, module, path, type, file);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static long length(Path file) {
|
|
||||||
try {
|
|
||||||
return Files.size(file);
|
|
||||||
} catch (IOException ex) {
|
|
||||||
throw new RuntimeException(ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static InputStream newStream(Path file) {
|
|
||||||
try {
|
|
||||||
return Files.newInputStream(file);
|
|
||||||
} catch (IOException ex) {
|
|
||||||
throw new UncheckedIOException(ex);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -177,9 +159,9 @@ public class FileCopierPlugin implements TransformerPlugin {
|
|||||||
Objects.requireNonNull(pool);
|
Objects.requireNonNull(pool);
|
||||||
Objects.requireNonNull(file);
|
Objects.requireNonNull(file);
|
||||||
Objects.requireNonNull(path);
|
Objects.requireNonNull(path);
|
||||||
ModuleEntry impl = ModuleEntry.create(FAKE_MODULE,
|
ModuleEntry impl = ModuleEntry.create(
|
||||||
"/" + FAKE_MODULE + "/other/" + path,
|
"/" + FAKE_MODULE + "/other/" + path,
|
||||||
ModuleEntry.Type.OTHER, newStream(file), length(file));
|
ModuleEntry.Type.OTHER, file);
|
||||||
try {
|
try {
|
||||||
pool.add(impl);
|
pool.add(impl);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
@ -187,13 +169,6 @@ public class FileCopierPlugin implements TransformerPlugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Set<Category> getType() {
|
|
||||||
Set<Category> set = new HashSet<>();
|
|
||||||
set.add(Category.TRANSFORMER);
|
|
||||||
return Collections.unmodifiableSet(set);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void configure(Map<String, String> config) {
|
public void configure(Map<String, String> config) {
|
||||||
List<String> arguments = Utils.parseList(config.get(NAME));
|
List<String> arguments = Utils.parseList(config.get(NAME));
|
||||||
|
@ -60,11 +60,6 @@ public final class GenerateJLIClassesPlugin implements TransformerPlugin {
|
|||||||
public GenerateJLIClassesPlugin() {
|
public GenerateJLIClassesPlugin() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Set<Category> getType() {
|
|
||||||
return Collections.singleton(Category.TRANSFORMER);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return NAME;
|
return NAME;
|
||||||
@ -176,10 +171,9 @@ public final class GenerateJLIClassesPlugin implements TransformerPlugin {
|
|||||||
byte[] bytes = result.getValue();
|
byte[] bytes = result.getValue();
|
||||||
|
|
||||||
// Add class to pool
|
// Add class to pool
|
||||||
ModuleEntry ndata = ModuleEntry.create(data.getModule(),
|
ModuleEntry ndata = ModuleEntry.create(
|
||||||
"/java.base/" + className + ".class",
|
"/java.base/" + className + ".class",
|
||||||
ModuleEntry.Type.CLASS_OR_RESOURCE,
|
bytes);
|
||||||
new ByteArrayInputStream(bytes), bytes.length);
|
|
||||||
if (!out.contains(ndata)) {
|
if (!out.contains(ndata)) {
|
||||||
out.add(ndata);
|
out.add(ndata);
|
||||||
}
|
}
|
||||||
|
@ -25,9 +25,9 @@
|
|||||||
package jdk.tools.jlink.internal.plugins;
|
package jdk.tools.jlink.internal.plugins;
|
||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.IllformedLocaleException;
|
import java.util.IllformedLocaleException;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -82,15 +82,15 @@ public final class IncludeLocalesPlugin implements TransformerPlugin, ResourcePr
|
|||||||
"sun.util.resources.ext",
|
"sun.util.resources.ext",
|
||||||
"sun.util.resources.provider");
|
"sun.util.resources.provider");
|
||||||
private static final String METAINFONAME = "LocaleDataMetaInfo";
|
private static final String METAINFONAME = "LocaleDataMetaInfo";
|
||||||
private static final String META_FILES =
|
private static final List<String> META_FILES = List.of(
|
||||||
"*module-info.class," +
|
".+module-info.class",
|
||||||
"*LocaleDataProvider.class," +
|
".+LocaleDataProvider.class",
|
||||||
"*" + METAINFONAME + ".class,";
|
".+" + METAINFONAME + ".class");
|
||||||
private static final String INCLUDE_LOCALE_FILES =
|
private static final List<String> INCLUDE_LOCALE_FILES = List.of(
|
||||||
"*sun/text/resources/ext/[^\\/]+_%%.class," +
|
".+sun/text/resources/ext/[^_]+_",
|
||||||
"*sun/util/resources/ext/[^\\/]+_%%.class," +
|
".+sun/util/resources/ext/[^_]+_",
|
||||||
"*sun/text/resources/cldr/ext/[^\\/]+_%%.class," +
|
".+sun/text/resources/cldr/ext/[^_]+_",
|
||||||
"*sun/util/resources/cldr/ext/[^\\/]+_%%.class,";
|
".+sun/util/resources/cldr/ext/[^_]+_");
|
||||||
private Predicate<String> predicate;
|
private Predicate<String> predicate;
|
||||||
private String userParam;
|
private String userParam;
|
||||||
private List<Locale.LanguageRange> priorityList;
|
private List<Locale.LanguageRange> priorityList;
|
||||||
@ -123,9 +123,7 @@ public final class IncludeLocalesPlugin implements TransformerPlugin, ResourcePr
|
|||||||
if (Arrays.stream(cr.getInterfaces())
|
if (Arrays.stream(cr.getInterfaces())
|
||||||
.anyMatch(i -> i.contains(METAINFONAME)) &&
|
.anyMatch(i -> i.contains(METAINFONAME)) &&
|
||||||
stripUnsupportedLocales(bytes, cr)) {
|
stripUnsupportedLocales(bytes, cr)) {
|
||||||
resource = ModuleEntry.create(MODULENAME, path,
|
resource = resource.create(bytes);
|
||||||
resource.getType(),
|
|
||||||
new ByteArrayInputStream(bytes), bytes.length);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -134,10 +132,8 @@ public final class IncludeLocalesPlugin implements TransformerPlugin, ResourcePr
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<Category> getType() {
|
public Category getType() {
|
||||||
Set<Category> set = new HashSet<>();
|
return Category.FILTER;
|
||||||
set.add(Category.FILTER);
|
|
||||||
return Collections.unmodifiableSet(set);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -206,15 +202,17 @@ public final class IncludeLocalesPlugin implements TransformerPlugin, ResourcePr
|
|||||||
String.format(PluginsResourceBundle.getMessage(NAME + ".nomatchinglocales"), userParam));
|
String.format(PluginsResourceBundle.getMessage(NAME + ".nomatchinglocales"), userParam));
|
||||||
}
|
}
|
||||||
|
|
||||||
String value = META_FILES + filtered.stream()
|
List<String> value = Stream.concat(
|
||||||
.map(s -> includeLocaleFilePatterns(s))
|
META_FILES.stream(),
|
||||||
.collect(Collectors.joining(","));
|
filtered.stream().flatMap(s -> includeLocaleFilePatterns(s).stream()))
|
||||||
|
.map(s -> "regex:" + s)
|
||||||
|
.collect(Collectors.toList());
|
||||||
predicate = ResourceFilter.includeFilter(value);
|
predicate = ResourceFilter.includeFilter(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String includeLocaleFilePatterns(String tag) {
|
private List<String> includeLocaleFilePatterns(String tag) {
|
||||||
|
List<String> files = new ArrayList<>();
|
||||||
String pTag = tag.replaceAll("-", "_");
|
String pTag = tag.replaceAll("-", "_");
|
||||||
String files = "";
|
|
||||||
int lastDelimiter = tag.length();
|
int lastDelimiter = tag.length();
|
||||||
String isoSpecial = pTag.matches("^(he|yi|id).*") ?
|
String isoSpecial = pTag.matches("^(he|yi|id).*") ?
|
||||||
pTag.replaceFirst("he", "iw")
|
pTag.replaceFirst("he", "iw")
|
||||||
@ -224,11 +222,11 @@ public final class IncludeLocalesPlugin implements TransformerPlugin, ResourcePr
|
|||||||
// Add tag patterns including parents
|
// Add tag patterns including parents
|
||||||
while (true) {
|
while (true) {
|
||||||
pTag = pTag.substring(0, lastDelimiter);
|
pTag = pTag.substring(0, lastDelimiter);
|
||||||
files += INCLUDE_LOCALE_FILES.replaceAll("%%", pTag);
|
files.addAll(includeLocaleFiles(pTag));
|
||||||
|
|
||||||
if (!isoSpecial.isEmpty()) {
|
if (!isoSpecial.isEmpty()) {
|
||||||
isoSpecial = isoSpecial.substring(0, lastDelimiter);
|
isoSpecial = isoSpecial.substring(0, lastDelimiter);
|
||||||
files += INCLUDE_LOCALE_FILES.replaceAll("%%", isoSpecial);
|
files.addAll(includeLocaleFiles(isoSpecial));
|
||||||
}
|
}
|
||||||
|
|
||||||
lastDelimiter = pTag.lastIndexOf('_');
|
lastDelimiter = pTag.lastIndexOf('_');
|
||||||
@ -240,31 +238,37 @@ public final class IncludeLocalesPlugin implements TransformerPlugin, ResourcePr
|
|||||||
final String lang = pTag;
|
final String lang = pTag;
|
||||||
|
|
||||||
// Add possible special locales of the COMPAT provider
|
// Add possible special locales of the COMPAT provider
|
||||||
files += Set.of(jaJPJPTag, noNONYTag, thTHTHTag).stream()
|
Set.of(jaJPJPTag, noNONYTag, thTHTHTag).stream()
|
||||||
.filter(stag -> lang.equals(stag.substring(0,2)))
|
.filter(stag -> lang.equals(stag.substring(0,2)))
|
||||||
.map(t -> INCLUDE_LOCALE_FILES.replaceAll("%%", t.replaceAll("-", "_")))
|
.map(t -> includeLocaleFiles(t.replaceAll("-", "_")))
|
||||||
.collect(Collectors.joining(","));
|
.forEach(files::addAll);
|
||||||
|
|
||||||
// Add possible UN.M49 files (unconditional for now) for each language
|
// Add possible UN.M49 files (unconditional for now) for each language
|
||||||
files += INCLUDE_LOCALE_FILES.replaceAll("%%", lang + "_[0-9]{3}");
|
files.addAll(includeLocaleFiles(lang + "_[0-9]{3}"));
|
||||||
if (!isoSpecial.isEmpty()) {
|
if (!isoSpecial.isEmpty()) {
|
||||||
files += INCLUDE_LOCALE_FILES.replaceAll("%%", isoSpecial + "_[0-9]{3}");
|
files.addAll(includeLocaleFiles(isoSpecial + "_[0-9]{3}"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add Thai BreakIterator related data files
|
// Add Thai BreakIterator related data files
|
||||||
if (lang.equals("th")) {
|
if (lang.equals("th")) {
|
||||||
files += "*sun/text/resources/thai_dict," +
|
files.add(".+sun/text/resources/thai_dict");
|
||||||
"*sun/text/resources/[^\\/]+BreakIteratorData_th,";
|
files.add(".+sun/text/resources/[^_]+BreakIteratorData_th");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add Taiwan resource bundles for Hong Kong
|
// Add Taiwan resource bundles for Hong Kong
|
||||||
if (tag.startsWith("zh-HK")) {
|
if (tag.startsWith("zh-HK")) {
|
||||||
files += INCLUDE_LOCALE_FILES.replaceAll("%%", "zh_TW");
|
files.addAll(includeLocaleFiles("zh_TW"));
|
||||||
}
|
}
|
||||||
|
|
||||||
return files;
|
return files;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private List<String> includeLocaleFiles(String localeStr) {
|
||||||
|
return INCLUDE_LOCALE_FILES.stream()
|
||||||
|
.map(s -> s + localeStr + ".class")
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
private boolean stripUnsupportedLocales(byte[] bytes, ClassReader cr) {
|
private boolean stripUnsupportedLocales(byte[] bytes, ClassReader cr) {
|
||||||
char[] buf = new char[cr.getMaxStringLength()];
|
char[] buf = new char[cr.getMaxStringLength()];
|
||||||
boolean[] modified = new boolean[1];
|
boolean[] modified = new boolean[1];
|
||||||
|
@ -31,7 +31,6 @@ import java.io.UncheckedIOException;
|
|||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
@ -284,11 +283,4 @@ public final class OptimizationPlugin extends AsmPlugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Set<Category> getType() {
|
|
||||||
Set<Category> set = new HashSet<>();
|
|
||||||
set.add(Category.TRANSFORMER);
|
|
||||||
return Collections.unmodifiableSet(set);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,6 @@ import java.nio.file.PathMatcher;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@ -143,11 +142,8 @@ public final class OrderResourcesPlugin implements TransformerPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<Category> getType() {
|
public Category getType() {
|
||||||
Set<Category> set = new HashSet<>();
|
return Category.SORTER;
|
||||||
set.add(Category.SORTER);
|
|
||||||
|
|
||||||
return Collections.unmodifiableSet(set);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -49,8 +49,8 @@ public final class ReleaseInfoPlugin implements TransformerPlugin {
|
|||||||
private final Map<String, String> release = new HashMap<>();
|
private final Map<String, String> release = new HashMap<>();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<Category> getType() {
|
public Category getType() {
|
||||||
return Collections.singleton(Category.METAINFO_ADDER);
|
return Category.METAINFO_ADDER;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -343,10 +343,8 @@ public class StringSharingPlugin implements TransformerPlugin, ResourcePrevisito
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<Category> getType() {
|
public Category getType() {
|
||||||
Set<Category> set = new HashSet<>();
|
return Category.COMPRESSOR;
|
||||||
set.add(Category.COMPRESSOR);
|
|
||||||
return Collections.unmodifiableSet(set);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -27,8 +27,6 @@ package jdk.tools.jlink.internal.plugins;
|
|||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
import jdk.internal.org.objectweb.asm.ClassReader;
|
import jdk.internal.org.objectweb.asm.ClassReader;
|
||||||
import jdk.internal.org.objectweb.asm.ClassWriter;
|
import jdk.internal.org.objectweb.asm.ClassWriter;
|
||||||
@ -57,13 +55,6 @@ public final class StripDebugPlugin implements TransformerPlugin {
|
|||||||
return NAME;
|
return NAME;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Set<Category> getType() {
|
|
||||||
Set<Category> set = new HashSet<>();
|
|
||||||
set.add(Category.TRANSFORMER);
|
|
||||||
return Collections.unmodifiableSet(set);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
return PluginsResourceBundle.getDescription(NAME);
|
return PluginsResourceBundle.getDescription(NAME);
|
||||||
@ -84,7 +75,7 @@ public final class StripDebugPlugin implements TransformerPlugin {
|
|||||||
ClassWriter writer = new ClassWriter(ClassWriter.COMPUTE_MAXS);
|
ClassWriter writer = new ClassWriter(ClassWriter.COMPUTE_MAXS);
|
||||||
reader.accept(writer, ClassReader.SKIP_DEBUG);
|
reader.accept(writer, ClassReader.SKIP_DEBUG);
|
||||||
byte[] content = writer.toByteArray();
|
byte[] content = writer.toByteArray();
|
||||||
res = ModuleEntry.create(path, new ByteArrayInputStream(content), content.length);
|
res = resource.create(content);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (predicate.test(res.getPath())) {
|
} else if (predicate.test(res.getPath())) {
|
||||||
|
@ -25,8 +25,6 @@
|
|||||||
package jdk.tools.jlink.internal.plugins;
|
package jdk.tools.jlink.internal.plugins;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Set;
|
|
||||||
import jdk.tools.jlink.plugin.ModuleEntry;
|
import jdk.tools.jlink.plugin.ModuleEntry;
|
||||||
import jdk.tools.jlink.plugin.ModulePool;
|
import jdk.tools.jlink.plugin.ModulePool;
|
||||||
import jdk.tools.jlink.plugin.TransformerPlugin;
|
import jdk.tools.jlink.plugin.TransformerPlugin;
|
||||||
@ -45,10 +43,8 @@ public final class StripNativeCommandsPlugin implements TransformerPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<Category> getType() {
|
public Category getType() {
|
||||||
Set<Category> set = new HashSet<>();
|
return Category.FILTER;
|
||||||
set.add(Category.FILTER);
|
|
||||||
return Collections.unmodifiableSet(set);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -82,11 +82,6 @@ public final class SystemModuleDescriptorPlugin implements TransformerPlugin {
|
|||||||
this.enabled = true;
|
this.enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Set<Category> getType() {
|
|
||||||
return Collections.singleton(Category.TRANSFORMER);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return NAME;
|
return NAME;
|
||||||
@ -144,11 +139,7 @@ public final class SystemModuleDescriptorPlugin implements TransformerPlugin {
|
|||||||
ModuleInfoRewriter minfoWriter =
|
ModuleInfoRewriter minfoWriter =
|
||||||
new ModuleInfoRewriter(bain, mbuilder.conceals());
|
new ModuleInfoRewriter(bain, mbuilder.conceals());
|
||||||
// replace with the overridden version
|
// replace with the overridden version
|
||||||
data = ModuleEntry.create(data.getModule(),
|
data = data.create(minfoWriter.getBytes());
|
||||||
data.getPath(),
|
|
||||||
data.getType(),
|
|
||||||
minfoWriter.stream(),
|
|
||||||
minfoWriter.size());
|
|
||||||
}
|
}
|
||||||
out.add(data);
|
out.add(data);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
@ -163,12 +154,7 @@ public final class SystemModuleDescriptorPlugin implements TransformerPlugin {
|
|||||||
return;
|
return;
|
||||||
if (builder.isOverriddenClass(data.getPath())) {
|
if (builder.isOverriddenClass(data.getPath())) {
|
||||||
byte[] bytes = cwriter.toByteArray();
|
byte[] bytes = cwriter.toByteArray();
|
||||||
ModuleEntry ndata =
|
ModuleEntry ndata = data.create(bytes);
|
||||||
ModuleEntry.create(data.getModule(),
|
|
||||||
data.getPath(),
|
|
||||||
data.getType(),
|
|
||||||
new ByteArrayInputStream(bytes),
|
|
||||||
bytes.length);
|
|
||||||
out.add(ndata);
|
out.add(ndata);
|
||||||
} else {
|
} else {
|
||||||
out.add(data);
|
out.add(data);
|
||||||
@ -188,8 +174,8 @@ public final class SystemModuleDescriptorPlugin implements TransformerPlugin {
|
|||||||
this.extender.write(this);
|
this.extender.write(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
InputStream stream() {
|
byte[] getBytes() {
|
||||||
return new ByteArrayInputStream(buf);
|
return buf;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,9 +29,7 @@ import java.io.IOException;
|
|||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
import java.util.zip.Deflater;
|
import java.util.zip.Deflater;
|
||||||
import jdk.tools.jlink.internal.ModulePoolImpl;
|
import jdk.tools.jlink.internal.ModulePoolImpl;
|
||||||
@ -66,10 +64,8 @@ public final class ZipPlugin implements TransformerPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<Category> getType() {
|
public Category getType() {
|
||||||
Set<Category> set = new HashSet<>();
|
return Category.COMPRESSOR;
|
||||||
set.add(Category.COMPRESSOR);
|
|
||||||
return Collections.unmodifiableSet(set);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -93,8 +93,7 @@ final class AsmPoolImpl implements AsmModulePool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
byte[] content = writer.toByteArray();
|
byte[] content = writer.toByteArray();
|
||||||
ModuleEntry res = ModuleEntry.create(path,
|
ModuleEntry res = ModuleEntry.create(path, content);
|
||||||
new ByteArrayInputStream(content), content.length);
|
|
||||||
transformedClasses.put(className, res);
|
transformedClasses.put(className, res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,16 +26,18 @@ package jdk.tools.jlink.plugin;
|
|||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.Objects;
|
import java.io.IOException;
|
||||||
import jdk.tools.jlink.internal.ImageFileCreator;
|
import java.io.OutputStream;
|
||||||
import jdk.tools.jlink.internal.ModuleEntryImpl;
|
import java.io.UncheckedIOException;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
import java.nio.file.Path;
|
||||||
|
import jdk.tools.jlink.internal.ModuleEntryFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A LinkModuleEntry is the elementary unit of data inside an image. It is
|
* A ModuleEntry is the elementary unit of data inside an image. It is
|
||||||
* generally a file. e.g.: a java class file, a resource file, a shared library,
|
* generally a file. e.g.: a java class file, a resource file, a shared library.
|
||||||
* ...
|
|
||||||
* <br>
|
* <br>
|
||||||
* A LinkModuleEntry is identified by a path of the form:
|
* A ModuleEntry is identified by a path of the form:
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>For jimage content: /{module name}/{package1}/.../{packageN}/{file
|
* <li>For jimage content: /{module name}/{package1}/.../{packageN}/{file
|
||||||
* name}</li>
|
* name}</li>
|
||||||
@ -63,93 +65,133 @@ public interface ModuleEntry {
|
|||||||
OTHER
|
OTHER
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* The LinkModuleEntry module name.
|
* The ModuleEntry module name.
|
||||||
*
|
*
|
||||||
* @return The module name.
|
* @return The module name.
|
||||||
*/
|
*/
|
||||||
public String getModule();
|
public String getModule();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The LinkModuleEntry path.
|
* The ModuleEntry path.
|
||||||
*
|
*
|
||||||
* @return The module path.
|
* @return The module path.
|
||||||
*/
|
*/
|
||||||
public String getPath();
|
public String getPath();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The LinkModuleEntry's type.
|
* The ModuleEntry's type.
|
||||||
*
|
*
|
||||||
* @return The data type.
|
* @return The data type.
|
||||||
*/
|
*/
|
||||||
public Type getType();
|
public Type getType();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The LinkModuleEntry content as an array of byte.
|
* The ModuleEntry content as an array of bytes.
|
||||||
*
|
*
|
||||||
* @return An Array of bytes.
|
* @return An Array of bytes.
|
||||||
*/
|
*/
|
||||||
public byte[] getBytes();
|
public default byte[] getBytes() {
|
||||||
|
try (InputStream is = stream()) {
|
||||||
|
return is.readAllBytes();
|
||||||
|
} catch (IOException ex) {
|
||||||
|
throw new UncheckedIOException(ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The LinkModuleEntry content length.
|
* The ModuleEntry content length.
|
||||||
*
|
*
|
||||||
* @return The length.
|
* @return The length.
|
||||||
*/
|
*/
|
||||||
public long getLength();
|
public long getLength();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The LinkModuleEntry stream.
|
* The ModuleEntry stream.
|
||||||
*
|
*
|
||||||
* @return The module data stream.
|
* @return The module data stream.
|
||||||
*/
|
*/
|
||||||
public InputStream stream();
|
public InputStream stream();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a LinkModuleEntry located inside a jimage file. Such
|
* Write the content of this ModuleEntry to stream.
|
||||||
* LinkModuleEntry has a Type being equals to CLASS_OR_RESOURCE.
|
|
||||||
*
|
*
|
||||||
* @param path The complete resource path (contains the module radical).
|
* @param out the output stream
|
||||||
* @param content The resource content.
|
|
||||||
* @param size The content size.
|
|
||||||
* @return A new LinkModuleEntry.
|
|
||||||
*/
|
*/
|
||||||
public static ModuleEntry create(String path, InputStream content, long size) {
|
public default void write(OutputStream out) {
|
||||||
Objects.requireNonNull(path);
|
try {
|
||||||
Objects.requireNonNull(content);
|
out.write(getBytes());
|
||||||
String[] split = ImageFileCreator.splitPath(path);
|
} catch (IOException ex) {
|
||||||
String module = split[0];
|
throw new UncheckedIOException(ex);
|
||||||
return new ModuleEntryImpl(module, path, Type.CLASS_OR_RESOURCE, content, size);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a LinkModuleEntry for a file that will be located inside a jimage
|
* Create a ModuleEntry with new content but other information
|
||||||
* file.
|
* copied from this ModuleEntry.
|
||||||
|
*
|
||||||
|
* @param content The new resource content.
|
||||||
|
* @return A new ModuleEntry.
|
||||||
|
*/
|
||||||
|
public default ModuleEntry create(byte[] content) {
|
||||||
|
return ModuleEntryFactory.create(this, content);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a ModuleEntry with new content but other information
|
||||||
|
* copied from this ModuleEntry.
|
||||||
|
*
|
||||||
|
* @param file The new resource content.
|
||||||
|
* @return A new ModuleEntry.
|
||||||
|
*/
|
||||||
|
public default ModuleEntry create(Path file) {
|
||||||
|
return ModuleEntryFactory.create(this, file);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a ModuleEntry for a resource of the given type.
|
||||||
|
*
|
||||||
|
* @param path The resource path.
|
||||||
|
* @param type The ModuleEntry type.
|
||||||
|
* @param content The resource content.
|
||||||
|
* @return A new ModuleEntry.
|
||||||
|
*/
|
||||||
|
public static ModuleEntry create(String path,
|
||||||
|
ModuleEntry.Type type, byte[] content) {
|
||||||
|
return ModuleEntryFactory.create(path, type, content);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a ModuleEntry for a resource of type {@link Type#CLASS_OR_RESOURCE}.
|
||||||
*
|
*
|
||||||
* @param path The resource path.
|
* @param path The resource path.
|
||||||
* @param content The resource content.
|
* @param content The resource content.
|
||||||
* @return A new LinkModuleEntry.
|
* @return A new ModuleEntry.
|
||||||
*/
|
*/
|
||||||
public static ModuleEntry create(String path, byte[] content) {
|
public static ModuleEntry create(String path, byte[] content) {
|
||||||
return create(path, new ByteArrayInputStream(content),
|
return create(path, Type.CLASS_OR_RESOURCE, content);
|
||||||
content.length);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a LinkModuleEntry for a file that will be located outside a jimage
|
* Create a ModuleEntry for a resource of the given type.
|
||||||
* file.
|
|
||||||
*
|
*
|
||||||
* @param module The module in which this files is located.
|
* @param path The resource path.
|
||||||
* @param path The file path locator (doesn't contain the module name).
|
* @param type The ModuleEntry type.
|
||||||
* @param type The LinkModuleEntry type.
|
* @param file The resource file.
|
||||||
* @param content The file content.
|
* @return A new ModuleEntry.
|
||||||
* @param size The content size.
|
|
||||||
* @return A new LinkModuleEntry.
|
|
||||||
*/
|
*/
|
||||||
public static ModuleEntry create(String module, String path, ModuleEntry.Type type,
|
public static ModuleEntry create(String path,
|
||||||
InputStream content, long size) {
|
ModuleEntry.Type type, Path file) {
|
||||||
Objects.requireNonNull(path);
|
return ModuleEntryFactory.create(path, type, file);
|
||||||
Objects.requireNonNull(content);
|
}
|
||||||
return new ModuleEntryImpl(module, path, type, content, size);
|
|
||||||
|
/**
|
||||||
|
* Create a ModuleEntry for a resource of type {@link Type#CLASS_OR_RESOURCE}.
|
||||||
|
*
|
||||||
|
* @param path The resource path.
|
||||||
|
* @param file The resource file.
|
||||||
|
* @return A new ModuleEntry.
|
||||||
|
*/
|
||||||
|
public static ModuleEntry create(String path, Path file) {
|
||||||
|
return create(path, Type.CLASS_OR_RESOURCE, file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -57,19 +57,29 @@ public interface Plugin {
|
|||||||
SORTER("SORTER"),
|
SORTER("SORTER"),
|
||||||
COMPRESSOR("COMPRESSOR"),
|
COMPRESSOR("COMPRESSOR"),
|
||||||
METAINFO_ADDER("METAINFO_ADDER"),
|
METAINFO_ADDER("METAINFO_ADDER"),
|
||||||
VERIFIER("VERIFIER"),
|
VERIFIER("VERIFIER", true),
|
||||||
PROCESSOR("PROCESSOR"),
|
PROCESSOR("PROCESSOR", true),
|
||||||
PACKAGER("PACKAGER");
|
PACKAGER("PACKAGER", true);
|
||||||
|
|
||||||
private final String name;
|
private final String name;
|
||||||
|
private final boolean postProcessor;
|
||||||
|
|
||||||
|
Category(String name, boolean postProcessor) {
|
||||||
|
this.name = name;
|
||||||
|
this.postProcessor = postProcessor;
|
||||||
|
}
|
||||||
|
|
||||||
Category(String name) {
|
Category(String name) {
|
||||||
this.name = name;
|
this(name, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isPostProcessor() {
|
||||||
|
return postProcessor;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -90,11 +100,12 @@ public interface Plugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Plugin set of types.
|
* The type of this plugin.
|
||||||
* @return The set of types.
|
*
|
||||||
|
* @return The type of this plugin
|
||||||
*/
|
*/
|
||||||
public default Set<Category> getType() {
|
public default Category getType() {
|
||||||
return Collections.emptySet();
|
return Category.TRANSFORMER;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -29,7 +29,7 @@ use --help for a list of possible options
|
|||||||
|
|
||||||
main.usage=\
|
main.usage=\
|
||||||
Usage: {0} <options> --modulepath <modulepath> --addmods <mods> --output <path>\n\
|
Usage: {0} <options> --modulepath <modulepath> --addmods <mods> --output <path>\n\
|
||||||
Possible options include:
|
\Possible options include:
|
||||||
|
|
||||||
error.prefix=Error:
|
error.prefix=Error:
|
||||||
warn.prefix=Warning:
|
warn.prefix=Warning:
|
||||||
@ -68,7 +68,18 @@ after checking the database for duplicates. \
|
|||||||
Include your program and the following diagnostic in your report. Thank you.
|
Include your program and the following diagnostic in your report. Thank you.
|
||||||
|
|
||||||
main.extended.help=\
|
main.extended.help=\
|
||||||
List of available plugins:
|
\List of available plugins:
|
||||||
|
|
||||||
|
main.extended.help.footer=\
|
||||||
|
\For options requiring a <pattern-list>, the value will be a comma\
|
||||||
|
\ separated list of elements each using one the following forms:\n\
|
||||||
|
\ <glob-pattern>\n\
|
||||||
|
\ glob:<glob-pattern>\n\
|
||||||
|
\ regex:<regex-pattern>\n\
|
||||||
|
\ @<filename> where filename is the name of a file containing patterns to be\
|
||||||
|
\ used, one pattern per line\n\
|
||||||
|
\n\
|
||||||
|
|
||||||
|
|
||||||
err.unknown.byte.order:unknown byte order {0}
|
err.unknown.byte.order:unknown byte order {0}
|
||||||
err.output.must.be.specified:--output must be specified
|
err.output.must.be.specified:--output must be specified
|
||||||
|
@ -37,15 +37,16 @@ class-optim.description=\
|
|||||||
Class optimization. Warning: This plugin is experimental.\n\
|
Class optimization. Warning: This plugin is experimental.\n\
|
||||||
An optional <log file> can be specified to log applied optimizations.
|
An optional <log file> can be specified to log applied optimizations.
|
||||||
|
|
||||||
compress.argument=<0|1|2>[:filter=<pattern>]
|
compress.argument=<0|1|2>[:filter=<pattern-list>]
|
||||||
|
|
||||||
compress.description=\
|
compress.description=\
|
||||||
Compress all resources in the output image.\n\
|
Compress all resources in the output image.\n\
|
||||||
Level 0: constant string sharing\n\
|
Level 0: constant string sharing\n\
|
||||||
Level 1: ZIP\n\
|
Level 1: ZIP\n\
|
||||||
Level 2: both.\n\
|
Level 2: both.\n\
|
||||||
An optional filter can be specified to list the pattern of files to be filtered.\n\
|
An optional <pattern-list> filter can be specified to list the pattern of\n\
|
||||||
Use ^ for negation. e.g.: *Exception.class,*Error.class,^/java.base/java/lang/*
|
files to be included.
|
||||||
|
|
||||||
|
|
||||||
compact-cp.argument=<resource paths>
|
compact-cp.argument=<resource paths>
|
||||||
|
|
||||||
@ -59,15 +60,15 @@ copy-files.description=\
|
|||||||
If files to copy are not absolute path, JDK home dir is used.\n\
|
If files to copy are not absolute path, JDK home dir is used.\n\
|
||||||
e.g.: jrt-fs.jar,LICENSE,/home/me/myfile.txt=somewehere/conf.txt
|
e.g.: jrt-fs.jar,LICENSE,/home/me/myfile.txt=somewehere/conf.txt
|
||||||
|
|
||||||
exclude-files.argument=<files to exclude | files of excluded files>
|
exclude-files.argument=<pattern-list> of files to exclude
|
||||||
|
|
||||||
exclude-files.description=\
|
exclude-files.description=\
|
||||||
Specify files to exclude. e.g.: *.diz, /java.base/native/client/*
|
Specify files to exclude. e.g.: **.java,glob:/java.base/native/client/**
|
||||||
|
|
||||||
exclude-resources.argument=<resources to exclude | file of excluded resources>
|
exclude-resources.argument=<pattern-list> resources to exclude
|
||||||
|
|
||||||
exclude-resources.description=\
|
exclude-resources.description=\
|
||||||
Specify resources to exclude. e.g.: *.jcov, */META-INF/*
|
Specify resources to exclude. e.g.: **.jcov,glob:**/META-INF/**
|
||||||
|
|
||||||
generate-jli-classes.argument=<bmh[:bmh-species=LL,L3,...]>
|
generate-jli-classes.argument=<bmh[:bmh-species=LL,L3,...]>
|
||||||
|
|
||||||
@ -78,10 +79,11 @@ installed-modules.description=Fast loading of module descriptors (always enabled
|
|||||||
|
|
||||||
onoff.argument=<on|off>
|
onoff.argument=<on|off>
|
||||||
|
|
||||||
order-resources.argument=<paths in priority order | file with resource paths>
|
order-resources.argument=<pattern-list> of paths in priority order. If a @file\n\
|
||||||
|
is specified, then each line should be an exact match for the path to be ordered
|
||||||
|
|
||||||
order-resources.description=\
|
order-resources.description=\
|
||||||
Order resources. e.g.: */module-info.class,/java.base/java/lang/*
|
Order resources. e.g.: **/module-info.class,@classlist,/java.base/java/lang/**
|
||||||
|
|
||||||
strip-debug.description=\
|
strip-debug.description=\
|
||||||
Strip debug information from the output image
|
Strip debug information from the output image
|
||||||
|
@ -1085,7 +1085,7 @@ public class JmodTask {
|
|||||||
|
|
||||||
@Override public Class<Pattern> valueType() { return Pattern.class; }
|
@Override public Class<Pattern> valueType() { return Pattern.class; }
|
||||||
|
|
||||||
@Override public String valuePattern() { return "pattern"; }
|
@Override public String valuePattern() { return "regex-pattern"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
static class PathMatcherConverter implements ValueConverter<PathMatcher> {
|
static class PathMatcherConverter implements ValueConverter<PathMatcher> {
|
||||||
@ -1100,7 +1100,7 @@ public class JmodTask {
|
|||||||
|
|
||||||
@Override public Class<PathMatcher> valueType() { return PathMatcher.class; }
|
@Override public Class<PathMatcher> valueType() { return PathMatcher.class; }
|
||||||
|
|
||||||
@Override public String valuePattern() { return "pattern"; }
|
@Override public String valuePattern() { return "pattern-list"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Support for @<file> in jmod help */
|
/* Support for @<file> in jmod help */
|
||||||
@ -1145,7 +1145,7 @@ public class JmodTask {
|
|||||||
String content = super.format(all);
|
String content = super.format(all);
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
|
|
||||||
builder.append("\n").append(" Main operation modes:\n ");
|
builder.append(getMessage("main.opt.mode")).append("\n ");
|
||||||
builder.append(getMessage("main.opt.mode.create")).append("\n ");
|
builder.append(getMessage("main.opt.mode.create")).append("\n ");
|
||||||
builder.append(getMessage("main.opt.mode.list")).append("\n ");
|
builder.append(getMessage("main.opt.mode.list")).append("\n ");
|
||||||
builder.append(getMessage("main.opt.mode.describe")).append("\n ");
|
builder.append(getMessage("main.opt.mode.describe")).append("\n ");
|
||||||
|
@ -28,11 +28,13 @@ Usage: {0} (create|list|describe|hash) <OPTIONS> <jmod-file>\n\
|
|||||||
use --help for a list of possible options
|
use --help for a list of possible options
|
||||||
|
|
||||||
main.usage=\
|
main.usage=\
|
||||||
Usage: {0} (create|list|describe|hash) <OPTIONS> <jmod-file>
|
Usage: {0} (create|list|describe|hash) <OPTIONS> <jmod-file>\n\
|
||||||
|
|
||||||
error.prefix=Error:
|
error.prefix=Error:
|
||||||
warn.prefix=Warning:
|
warn.prefix=Warning:
|
||||||
|
|
||||||
|
main.opt.mode=\
|
||||||
|
\Main operation modes:
|
||||||
main.opt.mode.create=\
|
main.opt.mode.create=\
|
||||||
\create - Creates a new jmod archive
|
\create - Creates a new jmod archive
|
||||||
main.opt.mode.list=\
|
main.opt.mode.list=\
|
||||||
@ -49,7 +51,9 @@ main.opt.libs=Location of native libraries
|
|||||||
main.opt.cmds=Location of native commands
|
main.opt.cmds=Location of native commands
|
||||||
main.opt.config=Location of user-editable config files
|
main.opt.config=Location of user-editable config files
|
||||||
main.opt.dry-run=Dry run of hash mode
|
main.opt.dry-run=Dry run of hash mode
|
||||||
main.opt.exclude=Exclude files, given as a PATTERN
|
main.opt.exclude=Exclude files matching the supplied comma separated pattern\
|
||||||
|
\ list, each element using one the following forms: <glob-pattern>,\
|
||||||
|
\ glob:<glob-pattern> or regex:<regex-pattern>
|
||||||
main.opt.module-version= Module version
|
main.opt.module-version= Module version
|
||||||
main.opt.main-class=Main class
|
main.opt.main-class=Main class
|
||||||
main.opt.main-class.arg=class-name
|
main.opt.main-class.arg=class-name
|
||||||
@ -61,7 +65,7 @@ main.opt.os-version=Operating system version
|
|||||||
main.opt.os-version.arg=os-version
|
main.opt.os-version.arg=os-version
|
||||||
main.opt.modulepath=Module path
|
main.opt.modulepath=Module path
|
||||||
main.opt.hash-modules=Compute and record hashes to tie a packaged module\
|
main.opt.hash-modules=Compute and record hashes to tie a packaged module\
|
||||||
\ with modules matching the given pattern and depending upon it directly\
|
\ with modules matching the given <regex-pattern> and depending upon it directly\
|
||||||
\ or indirectly. The hashes are recorded in the JMOD file being created, or\
|
\ or indirectly. The hashes are recorded in the JMOD file being created, or\
|
||||||
\ a JMOD file or modular JAR on the module path specified the jmod hash command.
|
\ a JMOD file or modular JAR on the module path specified the jmod hash command.
|
||||||
|
|
||||||
|
@ -272,8 +272,6 @@ sun/security/pkcs11/tls/TestMasterSecret.java 8077138,8023434
|
|||||||
sun/security/pkcs11/tls/TestPRF.java 8077138,8023434 windows-all
|
sun/security/pkcs11/tls/TestPRF.java 8077138,8023434 windows-all
|
||||||
sun/security/pkcs11/tls/TestPremaster.java 8077138,8023434 windows-all
|
sun/security/pkcs11/tls/TestPremaster.java 8077138,8023434 windows-all
|
||||||
|
|
||||||
sun/security/pkcs11/rsa/TestKeyPairGenerator.java 8074580 generic-all
|
|
||||||
|
|
||||||
sun/security/krb5/auto/HttpNegotiateServer.java 8038079 generic-all
|
sun/security/krb5/auto/HttpNegotiateServer.java 8038079 generic-all
|
||||||
|
|
||||||
sun/security/tools/keytool/autotest.sh 8130302 generic-all
|
sun/security/tools/keytool/autotest.sh 8130302 generic-all
|
||||||
@ -338,9 +336,6 @@ com/sun/jdi/GetLocalVariables4Test.sh 8067354 windows-
|
|||||||
|
|
||||||
# jdk_time
|
# jdk_time
|
||||||
|
|
||||||
java/time/test/java/time/TestClock_System.java 8158128 solaris-all
|
|
||||||
|
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
|
|
||||||
# jdk_util
|
# jdk_util
|
||||||
@ -387,8 +382,6 @@ com/sun/jndi/ldap/DeadSSLLdapTimeoutTest.java 8141370 linux-i5
|
|||||||
|
|
||||||
# core_tools
|
# core_tools
|
||||||
|
|
||||||
tools/jlink/plugins/IncludeLocalesPluginTest.java 8159781 generic-all
|
|
||||||
|
|
||||||
tools/jlink/JLinkOptimTest.java 8159264 generic-all
|
tools/jlink/JLinkOptimTest.java 8159264 generic-all
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user