Merge
This commit is contained in:
commit
c61ab1880f
@ -38,7 +38,8 @@ include TextFileProcessing.gmk
|
||||
include ZipArchive.gmk
|
||||
|
||||
# Prepare the find cache.
|
||||
$(eval $(call FillCacheFind, $(JDK_TOPDIR)/src))
|
||||
$(eval $(call FillCacheFind, $(wildcard $(JDK_TOPDIR)/src/demo \
|
||||
$(JDK_TOPDIR)/src/*/demo)))
|
||||
|
||||
# Append demo goals to this variable.
|
||||
TARGETS =
|
||||
|
83
jdk/make/CompileTools.gmk
Normal file
83
jdk/make/CompileTools.gmk
Normal file
@ -0,0 +1,83 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2014, 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.
|
||||
#
|
||||
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include JavaCompilation.gmk
|
||||
include SetupJavaCompilers.gmk
|
||||
|
||||
################################################################################
|
||||
|
||||
JIMAGE_PKGS := \
|
||||
jdk/internal/jimage \
|
||||
jdk/internal/jrtfs \
|
||||
#
|
||||
|
||||
$(eval $(call SetupJavaCompilation,BUILD_INTERIM_JIMAGE, \
|
||||
SETUP := GENERATE_OLDBYTECODE, \
|
||||
SRC := $(JDK_TOPDIR)/src/java.base/share/classes, \
|
||||
INCLUDES := $(JIMAGE_PKGS), \
|
||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes))
|
||||
|
||||
TARGETS += $(BUILD_INTERIM_JIMAGE)
|
||||
|
||||
# Because of the explicit INCLUDES in the compilation setup above, the service provider
|
||||
# file will not be copied unless META-INF/services would also be added to the INCLUDES.
|
||||
# Adding META-INF/services would include all files in that directory when only the one
|
||||
# is needed, which is why this explicit copy is defined instead.
|
||||
$(eval $(call SetupCopyFiles,COPY_JIMAGE_SERVICE_PROVIDER, \
|
||||
SRC := $(JDK_TOPDIR)/src/java.base/share/classes, \
|
||||
DEST := $(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes, \
|
||||
FILES := META-INF/services/java.nio.file.spi.FileSystemProvider))
|
||||
|
||||
TARGETS += $(COPY_JIMAGE_SERVICE_PROVIDER)
|
||||
|
||||
################################################################################
|
||||
|
||||
$(eval $(call SetupJavaCompilation,BUILD_TOOLS_JDK, \
|
||||
SETUP := GENERATE_OLDBYTECODE, \
|
||||
ADD_JAVAC_FLAGS := -Xbootclasspath/p:$(call PathList, \
|
||||
$(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes \
|
||||
$(BUILDTOOLS_OUTPUTDIR)/interim_cldrconverter_classes), \
|
||||
SRC := $(JDK_TOPDIR)/make/src/classes $(BUILDTOOLS_OUTPUTDIR)/interim_cldrconverter_classes, \
|
||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes, \
|
||||
COPY := boot.modules ext.modules))
|
||||
|
||||
$(BUILD_TOOLS_JDK): $(BUILD_INTERIM_JIMAGE) $(COPY_JIMAGE_SERVICE_PROVIDER)
|
||||
|
||||
TARGETS += $(BUILD_TOOLS_JDK)
|
||||
|
||||
$(eval $(call SetupCopyFiles,COPY_NIMBUS_TEMPLATES, \
|
||||
SRC := $(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus, \
|
||||
DEST := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes/build/tools/generatenimbus/resources, \
|
||||
FILES := $(wildcard $(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus/*.template)))
|
||||
|
||||
TARGETS += $(COPY_NIMBUS_TEMPLATES)
|
||||
|
||||
################################################################################
|
||||
|
||||
all: $(TARGETS)
|
@ -28,41 +28,38 @@ default: all
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
################################################################################
|
||||
|
||||
SAMPLE_TARGET_DIR := $(SUPPORT_OUTPUTDIR)/sample/image
|
||||
SAMPLE_SOURCE_DIR := $(JDK_TOPDIR)/src/sample/share
|
||||
SAMPLE_CLOSED_SOURCE_DIR := $(JDK_TOPDIR)/src/closed/sample/share
|
||||
SAMPLE_SOLARIS_SOURCE_DIR := $(JDK_TOPDIR)/src/sample/solaris
|
||||
|
||||
# Exclude the vm directory
|
||||
SAMPLE_FIND_FILTER := -name vm -prune -o
|
||||
$(eval $(call SetupCopyFiles, COPY_SHARE_SAMPLES, \
|
||||
SRC := $(SAMPLE_SOURCE_DIR), \
|
||||
DEST := $(SAMPLE_TARGET_DIR), \
|
||||
FILES := $(filter-out $(SAMPLE_SOURCE_DIR)/vm/%, \
|
||||
$(call CacheFind, $(SAMPLE_SOURCE_DIR))), \
|
||||
))
|
||||
|
||||
SAMPLE_SOURCE := $(shell $(FIND) $(SAMPLE_SOURCE_DIR) $(SAMPLE_FIND_FILTER) -type f -print)
|
||||
SAMPLE_TARGET := $(subst $(SAMPLE_SOURCE_DIR),$(SAMPLE_TARGET_DIR),$(SAMPLE_SOURCE))
|
||||
|
||||
ifndef OPENJDK
|
||||
# Exclude Main.java in EbayClient dir
|
||||
SAMPLE_CLOSED_SOURCE := $(shell $(FIND) $(SAMPLE_CLOSED_SOURCE_DIR) -type f -print | $(GREP) -v EbayClient/Main.java)
|
||||
SAMPLE_CLOSED_TARGET := $(subst $(SAMPLE_CLOSED_SOURCE_DIR),$(SAMPLE_TARGET_DIR),$(SAMPLE_CLOSED_SOURCE))
|
||||
SAMPLE_TARGET += $(SAMPLE_CLOSED_TARGET)
|
||||
endif
|
||||
TARGETS += $(COPY_SHARE_SAMPLES)
|
||||
|
||||
ifneq (, $(filter $(OPENJDK_TARGET_OS), solaris macosx))
|
||||
SAMPLE_SOLARIS_SOURCE := $(shell $(FIND) $(SAMPLE_SOLARIS_SOURCE_DIR) -type f -print)
|
||||
SAMPLE_SOLARIS_TARGET := $(subst $(SAMPLE_SOLARIS_SOURCE_DIR),$(SAMPLE_TARGET_DIR),$(SAMPLE_SOLARIS_SOURCE))
|
||||
SAMPLE_TARGET += $(SAMPLE_SOLARIS_TARGET)
|
||||
$(eval $(call SetupCopyFiles, COPY_SOLARIS_SAMPLES, \
|
||||
SRC := $(SAMPLE_SOLARIS_SOURCE_DIR), \
|
||||
DEST := $(SAMPLE_TARGET_DIR), \
|
||||
FILES := $(call CacheFind, $(SAMPLE_SOLARIS_SOURCE_DIR)), \
|
||||
))
|
||||
|
||||
TARGETS += $(COPY_SOLARIS_SAMPLES)
|
||||
endif
|
||||
|
||||
$(SAMPLE_TARGET_DIR)/dtrace/%: $(SAMPLE_SOLARIS_SOURCE_DIR)/dtrace/%
|
||||
$(call install-file)
|
||||
################################################################################
|
||||
|
||||
$(SAMPLE_TARGET_DIR)/webservices/%: $(SAMPLE_CLOSED_SOURCE_DIR)/webservices/%
|
||||
$(call install-file)
|
||||
$(eval $(call IncludeCustomExtension, jdk, CopySamples.gmk))
|
||||
|
||||
$(SAMPLE_TARGET_DIR)/%: $(SAMPLE_SOURCE_DIR)/%
|
||||
$(call install-file)
|
||||
################################################################################
|
||||
|
||||
COPY_FILES += $(SAMPLE_TARGET)
|
||||
all: $(TARGETS)
|
||||
|
||||
all: $(COPY_FILES)
|
||||
|
||||
.PHONY: all
|
||||
.PHONY: all default
|
||||
|
@ -48,7 +48,7 @@ endif
|
||||
ifneq ($(STATIC_BUILD), true)
|
||||
JSIG_IMPORT = jsig.*
|
||||
else
|
||||
JSIG_IMPORT =
|
||||
JSIG_IMPORT =
|
||||
endif
|
||||
|
||||
HOTSPOT_BASE_IMPORT_FILES := \
|
||||
|
@ -26,31 +26,14 @@
|
||||
ifndef _TOOLS_GMK
|
||||
_TOOLS_GMK := 1
|
||||
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include JavaCompilation.gmk
|
||||
include NativeCompilation.gmk
|
||||
include SetupJavaCompilers.gmk
|
||||
|
||||
################################################################################
|
||||
|
||||
$(eval $(call SetupJavaCompilation,BUILD_TOOLS_JDK, \
|
||||
SETUP := GENERATE_OLDBYTECODE, \
|
||||
ADD_JAVAC_FLAGS := -Xbootclasspath/p:$(call PathList, \
|
||||
$(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes \
|
||||
$(BUILDTOOLS_OUTPUTDIR)/interim_cldrconverter_classes), \
|
||||
SRC := $(JDK_TOPDIR)/make/src/classes $(BUILDTOOLS_OUTPUTDIR)/interim_cldrconverter_classes, \
|
||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes, \
|
||||
COPY := boot.modules ext.modules))
|
||||
|
||||
$(eval $(call SetupCopyFiles,COPY_NIMBUS_TEMPLATES, \
|
||||
SRC := $(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus, \
|
||||
DEST := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes/build/tools/generatenimbus/resources, \
|
||||
FILES := $(wildcard $(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus/*.template)))
|
||||
|
||||
BUILD_TOOLS_JDK += $(COPY_NIMBUS_TEMPLATES)
|
||||
# To avoid reevaluating the compilation setup for the tools each time this file
|
||||
# is included, the actual compilation is handled by CompileTools.gmk. The
|
||||
# following trick is used to be able to declare a dependency on the built tools.
|
||||
BUILD_TOOLS_JDK := $(call SetupJavaCompilationCompileTarget, \
|
||||
BUILD_TOOLS_JDK, $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes)
|
||||
|
||||
################################################################################
|
||||
|
||||
@ -135,34 +118,4 @@ TOOL_IMAGEBUILDER = $(JAVA_SMALL) -Xbootclasspath/p:$(BUILDTOOLS_OUTPUTDIR)/inte
|
||||
-cp $(call PathList, $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes $(JDK_OUTPUTDIR)) \
|
||||
build.tools.module.ImageBuilder
|
||||
|
||||
##########################################################################################
|
||||
|
||||
JIMAGE_PKGS := \
|
||||
jdk/internal/jimage \
|
||||
jdk/internal/jrtfs \
|
||||
#
|
||||
|
||||
$(eval $(call SetupJavaCompilation,BUILD_INTERIM_JIMAGE, \
|
||||
SETUP := GENERATE_OLDBYTECODE, \
|
||||
SRC := $(JDK_TOPDIR)/src/java.base/share/classes, \
|
||||
INCLUDES := $(JIMAGE_PKGS), \
|
||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes))
|
||||
|
||||
# Because of the explicit INCLUDES in the compilation setup above, the service provider
|
||||
# file will not be copied unless META-INF/services would also be added to the INCLUDES.
|
||||
# Adding META-INF/services would include all files in that directory when only the one
|
||||
# is needed, which is why this explicit copy is defined instead.
|
||||
$(eval $(call SetupCopyFiles,COPY_JIMAGE_SERVICE_PROVIDER, \
|
||||
SRC := $(JDK_TOPDIR)/src/java.base/share/classes, \
|
||||
DEST := $(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes, \
|
||||
FILES := META-INF/services/java.nio.file.spi.FileSystemProvider))
|
||||
|
||||
##########################################################################################
|
||||
|
||||
$(BUILD_TOOLS_JDK): $(BUILD_INTERIM_JIMAGE) $(COPY_JIMAGE_SERVICE_PROVIDER)
|
||||
|
||||
java-tools: $(BUILD_TOOLS_JDK)
|
||||
|
||||
all: java-tools
|
||||
|
||||
endif # _TOOLS_GMK
|
||||
|
@ -187,27 +187,31 @@ TARGETS += $(POLICY_DST)
|
||||
ifeq ($(CACERTS_FILE), )
|
||||
CACERTS_FILE := $(JDK_TOPDIR)/src/java.base/share/conf/security/cacerts
|
||||
endif
|
||||
|
||||
CACERTS_DST := $(LIB_DST_DIR)/security/cacerts
|
||||
|
||||
$(CACERTS_DST): $(CACERTS_FILE)
|
||||
$(call LogInfo, Copying $(patsubst $(OUTPUT_ROOT)/%, %, $@))
|
||||
$(call install-file)
|
||||
|
||||
TARGETS += $(CACERTS_DST)
|
||||
|
||||
################################################################################
|
||||
|
||||
$(CONF_DST_DIR)/net.properties: $(JDK_TOPDIR)/src/java.base/share/conf/net.properties
|
||||
$(ECHO) $(LOG_INFO) Copying $(@F)
|
||||
$(call install-file)
|
||||
$(eval $(call SetupCopyFiles, COPY_NET_PROPERTIES, \
|
||||
FILES := $(JDK_TOPDIR)/src/java.base/share/conf/net.properties, \
|
||||
DEST := $(CONF_DST_DIR), \
|
||||
))
|
||||
|
||||
TARGETS += $(CONF_DST_DIR)/net.properties
|
||||
TARGETS += $(COPY_NET_PROPERTIES)
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
$(CONF_DST_DIR)/sdp/sdp.conf.template: $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/conf/sdp/sdp.conf.template
|
||||
$(ECHO) $(LOG_INFO) Copying $(@F)
|
||||
$(call install-file)
|
||||
$(eval $(call SetupCopyFiles, COPY_SDP_CONF, \
|
||||
FILES := $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/conf/sdp/sdp.conf.template, \
|
||||
DEST := $(CONF_DST_DIR)/sdp, \
|
||||
))
|
||||
|
||||
TARGETS += $(CONF_DST_DIR)/sdp/sdp.conf.template
|
||||
TARGETS += $(COPY_SDP_CONF)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
@ -725,3 +725,26 @@ v9qpeC45ZA/jelxV11HKbQnVF194gDb7D2H9OsAsRUy8HVKbXEcc/8dKvwOqb+BC
|
||||
DBabJH1vJ9Gd+KwxMCmBZ6pQPl28JDimhJhI2LNqU349uADQVV0HJosddN/ARyyI
|
||||
LSIQO7BnNVKVG9Iujf33bvPNeg0qNz5qw+rKKq97Pqeum+L5oKU=
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
// Subject: CN=eDellRoot
|
||||
// Issuer: CN=eDellRoot
|
||||
// Serial Number:
|
||||
// 6b:c5:7b:95:18:93:aa:97:4b:62:4a:c0:88:fc:3b:b6
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIC8zCCAd+gAwIBAgIQa8V7lRiTqpdLYkrAiPw7tjAJBgUrDgMCHQUAMBQxEjAQ
|
||||
BgNVBAMTCWVEZWxsUm9vdDAeFw0xNTA0MDcxMDIzMjdaFw0zOTEyMzEyMzU5NTla
|
||||
MBQxEjAQBgNVBAMTCWVEZWxsUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
|
||||
AQoCggEBAL3RJg1uzVuEX0Hw4XWGzs6oI9W+o7HZdVdBMMVb4Gzb4uZjCTNjbPx4
|
||||
b8LNFL1uArUt+5VVMQDsOTY3Lg/Xe/UNukY2b+0llUOzzBYYpbsFcco4n6SsTvDh
|
||||
Ni5t+kPo7c23ZrYBPmOu82eEJ6cavs/t39u+wFOkXXwvRCiHA/lWyNWNEPh17+bC
|
||||
EP3q5N+JrV+6Ho3zQPEv5QUJYdmXsMmD2CMQojeQUj68J91P5w5BKjurG0xjivzh
|
||||
Soie9ym7VRwLFjWScRuw/9XV6CLqTyL5xrqiiDp1uTOuqNj3uxyts9ocbsoJXuxj
|
||||
5iEYkSM1nvLupEv+lgy9WqzIEFMm1l8CAwEAAaNJMEcwRQYDVR0BBD4wPIAQYA/f
|
||||
EzPwmaRcZuSaa/VZ1KEWMBQxEjAQBgNVBAMTCWVEZWxsUm9vdIIQa8V7lRiTqpdL
|
||||
YkrAiPw7tjAJBgUrDgMCHQUAA4IBAQArfdcScsezj8ooJ92UwwnPgg36noOgiUs5
|
||||
XzPLP4h0JpUYQVKB9hY1WTDwRUfTKGh7oNOowd027a/rVSb/TNeoiJIvMKn4gbvV
|
||||
CWAiHhO8u2u0RkHCDVsa7e0i4ncpueWsihjn6jBrY8T+7eDYwiFT/F03A8NJ7mK5
|
||||
lZA8SFd5CTDy3EBUU5UwzXUc5HoIRUxXSPycu3aIBWawg3sCdKiAoikScPAWj0bM
|
||||
0vmsP/8QSlTOBqO+QFQ6R82BtTvBNU3qbVICV4QObsxib++FAFL56NApPqskg7Vz
|
||||
LfNIAjKabHUcjbuZkmg6jr4BfYW7+oQDHCsYgADjjKGdKz/8U/fP
|
||||
-----END CERTIFICATE-----
|
||||
|
@ -68,8 +68,8 @@ BIFILES_TH := $(LD_DATA_PKG_DIR)/th/WordBreakIteratorData_th \
|
||||
$(BIFILES): $(BASE_DATA_PKG_DIR)/_the.bifiles
|
||||
$(BASE_DATA_PKG_DIR)/_the.bifiles: JAVA_FLAGS += -Xbootclasspath/p:$(BREAK_ITERATOR_CLASSES)
|
||||
$(BASE_DATA_PKG_DIR)/_the.bifiles: $(BUILD_TOOLS) $(UNICODEDATA) $(BUILD_BREAKITERATOR)
|
||||
$(ECHO) $(LOG_INFO) "Generating BreakIteratorData"
|
||||
$(MKDIR) -p $(@D)
|
||||
$(call LogInfo, Generating BreakIteratorData)
|
||||
$(call MakeDir, $(@D))
|
||||
$(RM) $(BIFILES)
|
||||
$(TOOL_GENERATEBREAKITERATORDATA) \
|
||||
-o $(@D) \
|
||||
@ -79,8 +79,8 @@ $(BASE_DATA_PKG_DIR)/_the.bifiles: $(BUILD_TOOLS) $(UNICODEDATA) $(BUILD_BREAKIT
|
||||
$(BIFILES_TH): $(LD_DATA_PKG_DIR)/_the.bifiles_th
|
||||
$(LD_DATA_PKG_DIR)/_the.bifiles_th: JAVA_FLAGS += -Xbootclasspath/p:$(BREAK_ITERATOR_CLASSES)
|
||||
$(LD_DATA_PKG_DIR)/_the.bifiles_th: $(BUILD_TOOLS) $(UNICODEDATA) $(BUILD_BREAKITERATOR)
|
||||
$(ECHO) $(LOG_INFO) "Generating BreakIteratorData_th"
|
||||
$(MKDIR) -p $(@D)/th
|
||||
$(call LogInfo, Generating BreakIteratorData_th)
|
||||
$(call MakeDir, $(@D)/th)
|
||||
$(RM) $(BIFILES_TH)
|
||||
$(TOOL_GENERATEBREAKITERATORDATA) \
|
||||
-o $(@D) \
|
||||
|
@ -27,7 +27,7 @@ GENDATA_HTML32DTD :=
|
||||
|
||||
HTML32DTD = $(JDK_OUTPUTDIR)/modules/java.desktop/javax/swing/text/html/parser/html32.bdtd
|
||||
$(HTML32DTD): $(BUILD_TOOLS_JDK)
|
||||
$(ECHO) "Generating HTML DTD file"
|
||||
$(call LogInfo, Generating HTML DTD file)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@
|
||||
($(TOOL_DTDBUILDER) $(LOG_INFO) html32 > $@) || exit 1
|
||||
|
@ -87,8 +87,7 @@ $(eval $(call SetupJarArchive, BUILD_US_EXPORT_POLICY_JAR, \
|
||||
|
||||
$(US_EXPORT_POLICY_JAR_LIMITED): \
|
||||
$(US_EXPORT_POLICY_JAR_UNLIMITED)
|
||||
$(ECHO) $(LOG_INFO) \
|
||||
Copying unlimited $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
||||
$(call LogInfo, Copying unlimited $(patsubst $(OUTPUT_ROOT)/%,%,$@))
|
||||
$(install-file)
|
||||
|
||||
TARGETS += $(US_EXPORT_POLICY_JAR_LIMITED) $(US_EXPORT_POLICY_JAR_UNLIMITED)
|
||||
@ -99,7 +98,7 @@ ifeq ($(UNLIMITED_CRYPTO), true)
|
||||
else
|
||||
$(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_LIMITED)
|
||||
$(install-file)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef OPENJDK
|
||||
ifneq ($(UNLIMITED_CRYPTO), true)
|
||||
|
@ -46,30 +46,34 @@ $(CHARSET_DONE_CS)-extcs: $(CHARSET_DATA_DIR)/charsets \
|
||||
$(wildcard $(CHARSET_DATA_DIR)/$(CHARSET_STANDARD_OS)) \
|
||||
$(CHARSET_TEMPLATES) $(CHARSET_EXTENDED_JAVA_TEMPLATES) \
|
||||
$(BUILD_TOOLS_JDK)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(call LogInfo, Generating jdk.charsets extcs)
|
||||
$(call MakeDir, $(@D))
|
||||
$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR_CS) \
|
||||
extcs charsets $(CHARSET_STANDARD_OS) \
|
||||
$(CHARSET_EXTENDED_JAVA_TEMPLATES) \
|
||||
$(CHARSET_EXTENDED_JAVA_DIR) \
|
||||
$(CHARSET_COPYRIGHT_HEADER) \
|
||||
$(LOG_INFO)
|
||||
$(LOG_DEBUG)
|
||||
$(TOUCH) '$@'
|
||||
|
||||
$(CHARSET_DONE_CS)-hkscs: $(CHARSET_COPYRIGHT_HEADER)/HKSCS.java \
|
||||
$(BUILD_TOOLS_JDK)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(call LogInfo, Generating jdk.charsets hkscs)
|
||||
$(call MakeDir, $(@D))
|
||||
$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR_CS) hkscs '$<'
|
||||
$(TOUCH) '$@'
|
||||
|
||||
$(CHARSET_DONE_CS)-euctw: $(CHARSET_COPYRIGHT_HEADER)/EUC_TW.java \
|
||||
$(BUILD_TOOLS_JDK)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(call LogInfo, Generating jdk.charsets euctw)
|
||||
$(call MakeDir, $(@D))
|
||||
$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR_CS) euctw '$<'
|
||||
$(TOUCH) '$@'
|
||||
|
||||
$(CHARSET_GENSRC_JAVA_DIR_CS)/sjis0213.dat: $(CHARSET_DATA_DIR)/sjis0213.map \
|
||||
$(BUILD_TOOLS_JDK)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(call LogInfo, Generating $(patsubst $(OUTPUT_ROOT)/%, %, $@))
|
||||
$(call MakeDir, $(@D))
|
||||
$(TOOL_CHARSETMAPPING) '$<' '$@' sjis0213
|
||||
|
||||
GENSRC_JDK_CHARSETS += \
|
||||
@ -86,4 +90,3 @@ jdk.charsets: $(GENSRC_JDK_CHARSETS)
|
||||
all: jdk.charsets
|
||||
|
||||
.PHONY: all jdk.charsets
|
||||
|
||||
|
@ -40,19 +40,18 @@ $(HEADER_FILE): $(JDWP_SPEC_FILE) $(BUILD_TOOLS_JDK)
|
||||
|
||||
# Touch the target of this rule at the end to avoid triggering false rebuilds
|
||||
$(JAVA_FILE): $(JDWP_SPEC_FILE) $(BUILD_TOOLS_JDK) $(HEADER_FILE)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(MKDIR) -p $(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent
|
||||
$(call LogInfo, Creating JDWP.java and JDWPCommands.h from jdwp.spec)
|
||||
$(call MakeDir, $(@D) $(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent)
|
||||
$(RM) $@ $(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent/JDWPCommands.h
|
||||
$(ECHO) $(LOG_INFO) Creating JDWP.java and JDWPCommands.h from jdwp.spec
|
||||
$(TOOL_JDWPGEN) $< -jdi $@ -include \
|
||||
$(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent/JDWPCommands.h
|
||||
$(TOUCH) $@
|
||||
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/jdwp-protocol.html: $(JDWP_SPEC_FILE) \
|
||||
$(BUILD_TOOLS_JDK)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(call LogInfo, Creating $(@F) from jdwp.spec)
|
||||
$(call MakeDir, $(@D))
|
||||
$(RM) $@
|
||||
$(ECHO) $(LOG_INFO) Creating $(@F) from jdwp.spec
|
||||
$(TOOL_JDWPGEN) $< -doc $@
|
||||
|
||||
GENSRC_JDWP := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/com/sun/tools/jdi/JDWP.java \
|
||||
@ -63,14 +62,14 @@ GENSRC_JDK_JDI += $(GENSRC_JDWP)
|
||||
################################################################################
|
||||
|
||||
define process-provider
|
||||
$(MKDIR) -p $(@D)
|
||||
$(call MakeDir, $(@D))
|
||||
$(CAT) $^ | $(SED) -e "s/^#\[$(OPENJDK_TARGET_OS)\]//" > $@
|
||||
endef
|
||||
|
||||
# Filter com.sun.jdi.connect.Connector
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector: \
|
||||
$(JDK_TOPDIR)/src/jdk.jdi/share/classes/META-INF/services/com.sun.jdi.connect.Connector \
|
||||
$(HOTSPOT_TOPDIR)/agent/src/share/classes/META-INF/services/com.sun.jdi.connect.Connector
|
||||
$(HOTSPOT_TOPDIR)/src/jdk.hotspot.agent/share/classes/META-INF/services/com.sun.jdi.connect.Connector
|
||||
$(process-provider)
|
||||
|
||||
# Copy the same service file into jdk.hotspot.agent so that they are kept the same.
|
||||
|
@ -23,7 +23,7 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
GENSRC_BUFFER :=
|
||||
GENSRC_BUFFER :=
|
||||
|
||||
GENSRC_BUFFER_DST := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/nio
|
||||
|
||||
@ -31,9 +31,9 @@ GENSRC_BUFFER_SRC := $(JDK_TOPDIR)/src/java.base/share/classes/java/nio
|
||||
|
||||
###
|
||||
|
||||
$(GENSRC_BUFFER_DST)/_the.buffer.dir:
|
||||
$(ECHO) "Generating buffer classes"
|
||||
$(MKDIR) -p $(@D)
|
||||
$(GENSRC_BUFFER_DST)/_the.buffer.dir:
|
||||
$(call LogInfo, Generating buffer classes)
|
||||
$(call MakeDir, $(@D))
|
||||
$(TOUCH) $@
|
||||
|
||||
define fixRw
|
||||
|
@ -35,8 +35,8 @@ UNICODEDATA = $(JDK_TOPDIR)/make/data/unicodedata
|
||||
define SetupCharacterData
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/lang/$1.java: \
|
||||
$(CHARACTERDATA)/$1.java.template
|
||||
$(MKDIR) -p $$(@D)
|
||||
$(ECHO) $(LOG_INFO) Generating $1.java
|
||||
$$(call LogInfo, Generating $1.java)
|
||||
$$(call MakeDir, $$(@D))
|
||||
$(TOOL_GENERATECHARACTER) $2 \
|
||||
-template $(CHARACTERDATA)/$1.java.template \
|
||||
-spec $(UNICODEDATA)/UnicodeData.txt \
|
||||
@ -56,7 +56,7 @@ $(eval $(call SetupCharacterData,CharacterData0E, -plane 14, 11 4 1))
|
||||
|
||||
# Copy two Java files that need no preprocessing.
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/lang/%.java: $(CHARACTERDATA)/%.java.template
|
||||
$(ECHO) $(LOG_INFO) Generating $(@F)
|
||||
$(call LogInfo, Generating $(@F))
|
||||
$(call install-file)
|
||||
|
||||
GENSRC_CHARACTERDATA += $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/lang/CharacterDataUndefined.java \
|
||||
|
@ -44,13 +44,13 @@ $(CHARSET_DONE_BASE)-stdcs: $(CHARSET_DATA_DIR)/charsets \
|
||||
$(wildcard $(CHARSET_DATA_DIR)/$(CHARSET_STANDARD_OS)) \
|
||||
$(CHARSET_TEMPLATES) $(CHARSET_STANDARD_JAVA_TEMPLATES) \
|
||||
$(BUILD_TOOLS_JDK)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(call LogInfo, Generating java.base charset mapping)
|
||||
$(call MakeDir, $(@D))
|
||||
$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR_BASE) \
|
||||
stdcs charsets $(CHARSET_STANDARD_OS) \
|
||||
$(CHARSET_STANDARD_JAVA_TEMPLATES) $(CHARSET_EXTSRC_DIR) \
|
||||
$(CHARSET_COPYRIGHT_HEADER) \
|
||||
$(LOG_INFO)
|
||||
$(LOG_DEBUG)
|
||||
$(TOUCH) '$@'
|
||||
|
||||
GENSRC_JAVA_BASE += $(CHARSET_DONE_BASE)-stdcs
|
||||
|
||||
|
@ -32,21 +32,12 @@ GENSRC_EXCEPTIONS_CMD := $(JDK_TOPDIR)/make/scripts/genExceptions.sh
|
||||
|
||||
GENSRC_EXCEPTIONS_SRC_DIRS := . charset channels
|
||||
|
||||
###
|
||||
|
||||
$(GENSRC_EXCEPTIONS_DST)/_the.exceptions.dir:
|
||||
$(ECHO) "Generating exceptions classes"
|
||||
$(MKDIR) -p $(@D)
|
||||
$(TOUCH) $@
|
||||
|
||||
|
||||
###
|
||||
|
||||
$(GENSRC_EXCEPTIONS_DST)/_the.%.marker: $(GENSRC_EXCEPTIONS_SRC)/%/exceptions \
|
||||
$(GENSRC_EXCEPTIONS_CMD) \
|
||||
$(GENSRC_EXCEPTIONS_DST)/_the.exceptions.dir
|
||||
$(MKDIR) -p $(@D)/$*
|
||||
SCRIPTS="$(JDK_TOPDIR)/make/scripts" NAWK="$(NAWK)" SH="$(SH)" $(SH) $(GENSRC_EXCEPTIONS_CMD) $< $(@D)/$* $(LOG_INFO)
|
||||
$(GENSRC_EXCEPTIONS_CMD)
|
||||
$(call LogInfo, Generating exceptions java.nio $*)
|
||||
$(call MakeDir, $(@D)/$*)
|
||||
SCRIPTS="$(JDK_TOPDIR)/make/scripts" NAWK="$(NAWK)" SH="$(SH)" $(SH) \
|
||||
$(GENSRC_EXCEPTIONS_CMD) $< $(@D)/$* $(LOG_DEBUG)
|
||||
$(TOUCH) $@
|
||||
|
||||
GENSRC_EXCEPTIONS += $(foreach D,$(GENSRC_EXCEPTIONS_SRC_DIRS),$(GENSRC_EXCEPTIONS_DST)/_the.$(D).marker)
|
||||
|
@ -65,8 +65,8 @@ GENSRC_AWT_ICONS_DST_NAME = AWTIcon$(2)_$(subst .,_,$(subst -,_,$(1)))
|
||||
################################################################################
|
||||
|
||||
$(GENSRC_AWT_ICONS_TMP)/_the.icons.dir:
|
||||
$(ECHO) Generating icon classes
|
||||
$(MKDIR) -p $(GENSRC_AWT_ICONS_DST)
|
||||
$(call LogInfo, Generating icon classes)
|
||||
$(call MakeDir, $(GENSRC_AWT_ICONS_DST))
|
||||
$(TOUCH) $@
|
||||
|
||||
################################################################################
|
||||
@ -121,8 +121,9 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
endif
|
||||
|
||||
$(GENSRC_OSX_ICONS): $(GENSRC_OSX_ICONS_SRC) $(BUILD_TOOLS_JDK)
|
||||
$(call LogInfo, Generating $(patsubst $(OUTPUT_ROOT)/%, %, $@))
|
||||
$(call MakeDir, $(@D))
|
||||
$(RM) $@ $@.tmp
|
||||
$(MKDIR) -p $(dir $@)
|
||||
$(ECHO) "static unsigned char sAWTIconData[] = { " >> $@.tmp
|
||||
$(CAT) $< | $(TOOL_OSX_TOBIN) >> $@.tmp
|
||||
$(ECHO) "};" >> $@.tmp
|
||||
|
@ -28,8 +28,9 @@
|
||||
# into LocaleDataMetaInfo.java
|
||||
|
||||
# First go look for all locale files
|
||||
LOCALE_FILES := $(shell $(FIND) $(JDK_TOPDIR)/src/java.base/share/classes \
|
||||
$(JDK_TOPDIR)/src/jdk.localedata/share/classes \
|
||||
LOCALE_FILES := $(shell $(FIND) \
|
||||
$(JDK_TOPDIR)/src/$(MODULE)/share/classes/sun/text/resources \
|
||||
$(JDK_TOPDIR)/src/$(MODULE)/share/classes/sun/util/resources \
|
||||
-name "FormatData_*.java" -o -name "FormatData_*.properties" -o \
|
||||
-name "CollationData_*.java" -o -name "CollationData_*.properties" -o \
|
||||
-name "TimeZoneNames_*.java" -o -name "TimeZoneNames_*.properties" -o \
|
||||
@ -42,17 +43,21 @@ LOCALE_FILES := $(shell $(FIND) $(JDK_TOPDIR)/src/java.base/share/classes \
|
||||
LOCALE_RESOURCES := $(sort $(subst .properties,,$(subst .java,,$(notdir $(LOCALE_FILES)))))
|
||||
|
||||
# Include the list of resources found during the previous compile.
|
||||
-include $(SUPPORT_OUTPUTDIR)/gensrc/_the.locale_resources
|
||||
-include $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/_the.locale_resources
|
||||
|
||||
MISSING_RESOURCES := $(filter-out $(LOCALE_RESOURCES), $(PREV_LOCALE_RESOURCES))
|
||||
NEW_RESOURCES := $(filter-out $(PREV_LOCALE_RESOURCES), $(LOCALE_RESOURCES))
|
||||
|
||||
ifneq (, $(MISSING_RESOURCES)$(NEW_RESOURCES))
|
||||
# There is a difference in the number of supported resources. Trigger a regeneration.
|
||||
$(shell $(RM) $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/util/locale/provider/BaseLocaleDataMetaInfo.java \
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.localedata/sun/util/resources/provider/NonBaseLocaleDataMetaInfo.java \
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/util/cldr/CLDRBaseLocaleDataMetaInfo.java \
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.localedata/sun/util/resources/cldr/provider/CLDRLocaleDataMetaInfo_jdk_localedata.java)
|
||||
ifeq ($(MODULE), java.base)
|
||||
$(shell $(RM) $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/util/locale/provider/BaseLocaleDataMetaInfo.java \
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/util/cldr/CLDRBaseLocaleDataMetaInfo.java)
|
||||
endif
|
||||
ifeq ($(MODULE), jdk.localedata)
|
||||
$(shell $(RM) $(SUPPORT_OUTPUTDIR)/gensrc/jdk.localedata/sun/util/resources/provider/NonBaseLocaleDataMetaInfo.java \
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.localedata/sun/util/resources/cldr/provider/CLDRLocaleDataMetaInfo_jdk_localedata.java)
|
||||
endif
|
||||
endif
|
||||
|
||||
# The base locales
|
||||
@ -121,18 +126,18 @@ SED_NONBASEARGS += -e 's/$(HASH)AvailableLocales_Locales$(HASH)/$(sort $(ALL_NON
|
||||
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/util/locale/provider/BaseLocaleDataMetaInfo.java: \
|
||||
$(JDK_TOPDIR)/src/java.base/share/classes/sun/util/locale/provider/LocaleDataMetaInfo-XLocales.java.template
|
||||
$(call LogInfo, Creating sun/util/locale/provider/BaseLocaleDataMetaInfo.java from $(words $(LOCALE_RESOURCES)) found resources)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(ECHO) Creating sun/util/locale/provider/BaseLocaleDataMetaInfo.java from $(words $(LOCALE_RESOURCES)) found resources.
|
||||
$(PRINTF) "PREV_LOCALE_RESOURCES:=$(LOCALE_RESOURCES)" \
|
||||
> $(SUPPORT_OUTPUTDIR)/gensrc/_the.locale_resources
|
||||
> $(SUPPORT_OUTPUTDIR)/gensrc/java.base/_the.locale_resources
|
||||
$(SED) $(SED_BASEARGS) $< > $@
|
||||
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.localedata/sun/util/resources/provider/NonBaseLocaleDataMetaInfo.java: \
|
||||
$(JDK_TOPDIR)/src/java.base/share/classes/sun/util/locale/provider/LocaleDataMetaInfo-XLocales.java.template
|
||||
$(call LogInfo, Creating sun/util/resources/provider/NonBaseLocaleDataMetaInfo.java from $(words $(LOCALE_RESOURCES)) found resources)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(ECHO) Creating sun/util/resources/provider/NonBaseLocaleDataMetaInfo.java from $(words $(LOCALE_RESOURCES)) found resources.
|
||||
$(PRINTF) "PREV_LOCALE_RESOURCES:=$(LOCALE_RESOURCES)" \
|
||||
> $(SUPPORT_OUTPUTDIR)/gensrc/_the.locale_resources
|
||||
> $(SUPPORT_OUTPUTDIR)/gensrc/jdk.localedata/_the.locale_resources
|
||||
$(SED) $(SED_NONBASEARGS) $< > $@
|
||||
|
||||
GENSRC_BASELOCALEDATA := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/util/locale/provider/BaseLocaleDataMetaInfo.java
|
||||
|
@ -50,7 +50,7 @@ GENSRC_SOR_BIN := $(BUILDTOOLS_OUTPUTDIR)/native/genSocketOptionRegistry
|
||||
SOR_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSRC_SOR_SRC)/$(GENSRC_SOR_SRC_FILE) | \
|
||||
$(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }')
|
||||
|
||||
$(eval $(call SetupNativeCompilation,BUILD_GENSRC_SOR_EXE, \
|
||||
$(eval $(call SetupNativeCompilation, BUILD_GENSRC_SOR_EXE, \
|
||||
SRC := $(GENSRC_SOR_SRC), \
|
||||
INCLUDE_FILES := $(GENSRC_SOR_SRC_FILE), \
|
||||
TOOLCHAIN := TOOLCHAIN_BUILD, \
|
||||
@ -86,7 +86,7 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
|
||||
UC_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSRC_UC_SRC)/$(GENSRC_UC_SRC_FILE) | \
|
||||
$(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }')
|
||||
|
||||
$(eval $(call SetupNativeCompilation,BUILD_GENSRC_UC_EXE, \
|
||||
$(eval $(call SetupNativeCompilation, BUILD_GENSRC_UC_EXE, \
|
||||
SRC := $(GENSRC_UC_SRC), \
|
||||
INCLUDE_FILES := $(GENSRC_UC_SRC_FILE), \
|
||||
TOOLCHAIN := TOOLCHAIN_BUILD, \
|
||||
@ -124,7 +124,7 @@ ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
SOL_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSRC_SOL_SRC)/$(GENSRC_SOL_SRC_FILE) | \
|
||||
$(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }')
|
||||
|
||||
$(eval $(call SetupNativeCompilation,BUILD_GENSRC_SOL_EXE, \
|
||||
$(eval $(call SetupNativeCompilation, BUILD_GENSRC_SOL_EXE, \
|
||||
SRC := $(GENSRC_SOL_SRC), \
|
||||
INCLUDE_FILES := $(GENSRC_SOL_SRC_FILE), \
|
||||
TOOLCHAIN := TOOLCHAIN_BUILD, \
|
||||
|
@ -75,7 +75,7 @@ define SetupCompilePropertiesBody
|
||||
|
||||
# Convert .../src/<module>/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties
|
||||
# to .../support/gensrc/<module>/com/sun/tools/javac/resources/javac_zh_CN.java
|
||||
# Strip away prefix and suffix, leaving for example only:
|
||||
# Strip away prefix and suffix, leaving for example only:
|
||||
# "<module>/share/classes/com/sun/tools/javac/resources/javac_zh_CN"
|
||||
$1_JAVAS := $$(patsubst $$($1_MODULE_PATH_ROOT)/%, \
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc/%, \
|
||||
|
@ -31,12 +31,11 @@ NIMBUS_GENSRC_DIR = $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/javax/swing/plaf/ni
|
||||
NIMBUS_SKIN_FILE = $(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus/skin.laf
|
||||
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/_the.generated_nimbus: $(NIMBUS_SKIN_FILE) $(BUILD_TOOLS_JDK)
|
||||
$(call LogInfo, Generating Nimbus source files)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(ECHO) "Generating Nimbus source files"
|
||||
$(TOOL_GENERATENIMBUS) $(LOG_INFO) \
|
||||
$(TOOL_GENERATENIMBUS) $(LOG_DEBUG) \
|
||||
-skinFile $(NIMBUS_SKIN_FILE) -buildDir $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop \
|
||||
-packagePrefix $(NIMBUS_PACKAGE).nimbus -lafName Nimbus
|
||||
$(ECHO) $(LOG_INFO) "Finished generating Nimbus source files"
|
||||
$(TOUCH) $@
|
||||
|
||||
GENSRC_SWING_NIMBUS := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/_the.generated_nimbus
|
||||
|
@ -63,14 +63,14 @@ GENSRC_X11_SIZES_USED := $(addprefix $(GENSRC_X11WRAPPERS_TMP)/sizes., $(GENSRC_
|
||||
# Copy only the sizes.* files that are actually needed. WrapperGenerator picks up any it finds from the
|
||||
# file prefix it is given so those not needed need to be hidden.
|
||||
$(GENSRC_X11WRAPPERS_TMP)/sizes.%: $(GENSRC_SIZER_DIR)/sizes.%
|
||||
$(MKDIR) -p $(@D)
|
||||
$(call MakeDir, $(@D))
|
||||
$(RM) '$@'
|
||||
$(SORT) $< > $@
|
||||
|
||||
# Run the tool on the offset files copied from the source repository to generate several Java classes
|
||||
# used in awt.
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/_the.generated.x11: $(GENSRC_X11_SIZES_USED) $(BUILD_TOOLS_JDK)
|
||||
$(MKDIR) -p $(GENSRC_X11WRAPPERS_DST)
|
||||
$(call MakeDir, $(GENSRC_X11WRAPPERS_DST))
|
||||
$(TOOL_WRAPPERGENERATOR) $(GENSRC_X11WRAPPERS_DST) $(GENSRC_SIZER_DIR)/xlibtypes.txt "gen" $(GENSRC_X11WRAPPERS_TMP)/sizes
|
||||
$(TOUCH) $@
|
||||
|
||||
@ -82,8 +82,8 @@ ifneq ($(COMPILE_TYPE), cross)
|
||||
|
||||
# Generate the C code for the program that will output the offset file.
|
||||
$(GENSRC_X11WRAPPERS_TMP)/sizer.%.c: $(GENSRC_SIZER_DIR)/xlibtypes.txt $(BUILD_TOOLS_JDK)
|
||||
$(ECHO) "Generating X11 wrapper ($*-bit version)"
|
||||
$(MKDIR) -p $(@D)
|
||||
$(call LogInfo, Generating X11 wrapper ($*-bit version))
|
||||
$(call MakeDir, $(@D))
|
||||
$(TOOL_WRAPPERGENERATOR) $(@D) $(GENSRC_SIZER_DIR)/xlibtypes.txt "sizer" $*
|
||||
|
||||
# use -m32/-m64 only if the compiler supports it
|
||||
@ -103,7 +103,7 @@ ifneq ($(COMPILE_TYPE), cross)
|
||||
|
||||
# Compile the C code into an executable.
|
||||
$(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe: $(GENSRC_X11WRAPPERS_TMP)/sizer.%.c
|
||||
$(MKDIR) -p $(@D)
|
||||
$(call MakeDir, $(@D))
|
||||
(cd $(@D) && $(CC) $(MEMORY_MODEL_FLAG) -o $@ $< \
|
||||
$(X_CFLAGS) \
|
||||
$(X_LIBS) \
|
||||
@ -114,9 +114,9 @@ ifneq ($(COMPILE_TYPE), cross)
|
||||
# Run the executable create the offset file and check that it is identical
|
||||
# to the offset file in the source code repository.
|
||||
$(GENSRC_X11WRAPPERS_TMP)/sizes.%.verification: $(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe
|
||||
$(MKDIR) -p $(@D)
|
||||
$(call LogInfo, Verifying X11 wrapper sizes)
|
||||
$(call MakeDir, $(@D))
|
||||
$(GENSRC_X11WRAPPERS_TMP)/sizer.$*.exe | $(SORT) > $@.tmp
|
||||
$(ECHO) Verifying $(GENSRC_X11WRAPPERS_TMP)/sizes.$*.verification.tmp to $(GENSRC_X11WRAPPERS_TMP)/sizes.$*
|
||||
$(DIFF) $(GENSRC_X11WRAPPERS_TMP)/sizes.$*.verification.tmp $(GENSRC_X11WRAPPERS_TMP)/sizes.$*
|
||||
mv $@.tmp $@
|
||||
|
||||
|
@ -130,7 +130,6 @@ ifneq ($(BUILD_JEXEC_SRC), )
|
||||
LDFLAGS := $(LDFLAGS_JDKEXE), \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jexec_obj, \
|
||||
OUTPUT_DIR := $(BUILD_JEXEC_DST_DIR), \
|
||||
DEBUG_SYMBOLS := true, \
|
||||
PROGRAM := jexec))
|
||||
|
||||
TARGETS += $(BUILD_JEXEC)
|
||||
|
@ -45,7 +45,6 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/jdk.accessibility/jabswitch, \
|
||||
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_cmds/jdk.accessibility, \
|
||||
PROGRAM := jabswitch, \
|
||||
DEBUG_SYMBOLS := true, \
|
||||
VERSIONINFO_RESOURCE := $(ACCESSBRIDGE_SRC)/AccessBridgeStatusWindow.RC, \
|
||||
RC_FLAGS := $(RC_FLAGS) \
|
||||
-D "JDK_FNAME=jabswitch.exe" \
|
||||
@ -79,7 +78,6 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/jdk.accessibility/jaccessinspector$1, \
|
||||
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_cmds/jdk.accessibility, \
|
||||
PROGRAM := jaccessinspector$1, \
|
||||
DEBUG_SYMBOLS := true, \
|
||||
VERSIONINFO_RESOURCE := $(TOPDIR)/jaccessinspector/jaccessinspectorWindow.rc, \
|
||||
RC_FLAGS := $$(RC_FLAGS) \
|
||||
-D "JDK_FNAME=jaccessinspector$1.exe" \
|
||||
@ -107,7 +105,6 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/jdk.accessibility/jaccesswalker$1, \
|
||||
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_cmds/jdk.accessibility, \
|
||||
PROGRAM := jaccesswalker$1, \
|
||||
DEBUG_SYMBOLS := true, \
|
||||
VERSIONINFO_RESOURCE := $(TOPDIR)/jaccesswalker/jaccesswalkerWindow.rc, \
|
||||
RC_FLAGS := $$(RC_FLAGS) \
|
||||
-D "JDK_FNAME=jaccesswalker$1.exe" \
|
||||
|
@ -100,7 +100,6 @@ $(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE, \
|
||||
-D "JDK_FNAME=unpack200.exe" \
|
||||
-D "JDK_INTERNAL_NAME=unpack200" \
|
||||
-D "JDK_FTYPE=0x1L", \
|
||||
DEBUG_SYMBOLS := true, \
|
||||
MANIFEST := $(JDK_TOPDIR)/src/jdk.pack200/windows/native/unpack200/unpack200_proto.exe.manifest, \
|
||||
MANIFEST_VERSION := $(VERSION_NUMBER_FOUR_POSITIONS), \
|
||||
))
|
||||
|
@ -25,15 +25,6 @@
|
||||
|
||||
include NativeCompilation.gmk
|
||||
|
||||
# SetupNativeCompilation now supports debug symbols on macosx for hotspot.
|
||||
# Disable it here for the jdk binaries until we decide to enable them.
|
||||
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
ENABLE_DEBUG_SYMBOLS := false
|
||||
endif
|
||||
|
||||
# Prepare the find cache.
|
||||
$(eval $(call FillCacheFind, $(JDK_TOPDIR)/src/java.base/share/native/launcher))
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
ORIGIN_ARG := $(call SET_EXECUTABLE_ORIGIN)
|
||||
else
|
||||
@ -124,7 +115,7 @@ define SetupBuildLauncherBody
|
||||
$1_LDFLAGS += -exported_symbols_list \
|
||||
$(SUPPORT_OUTPUTDIR)/build-static/exported.symbols
|
||||
$1_LIBS += \
|
||||
$(shell $(FIND) $(SUPPORT_OUTPUTDIR)/modules_libs/java.base -name "*.a") \
|
||||
$$(shell $(FIND) $(SUPPORT_OUTPUTDIR)/modules_libs/java.base -name "*.a") \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_libs/jdk.jdwp.agent/libdt_socket.a \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_libs/jdk.jdwp.agent/libjdwp.a \
|
||||
$(SUPPORT_OUTPUTDIR)/native/java.base/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX) \
|
||||
@ -174,8 +165,7 @@ define SetupBuildLauncherBody
|
||||
endif
|
||||
|
||||
$$(eval $$(call SetupNativeCompilation, BUILD_LAUNCHER_$1, \
|
||||
SRC := $(LAUNCHER_SRC), \
|
||||
INCLUDE_FILES := main.c, \
|
||||
EXTRA_FILES := $(LAUNCHER_SRC)/main.c, \
|
||||
OPTIMIZATION := $$($1_OPTIMIZATION), \
|
||||
CFLAGS := $$($1_CFLAGS) \
|
||||
$(LAUNCHER_CFLAGS) \
|
||||
@ -204,7 +194,6 @@ define SetupBuildLauncherBody
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/$1_objs, \
|
||||
OUTPUT_DIR := $$($1_OUTPUT_DIR), \
|
||||
PROGRAM := $1, \
|
||||
DEBUG_SYMBOLS := true, \
|
||||
VERSIONINFO_RESOURCE := $$($1_VERSION_INFO_RESOURCE), \
|
||||
RC_FLAGS := $$(RC_FLAGS) \
|
||||
-D "JDK_FNAME=$1$(EXE_SUFFIX)" \
|
||||
|
@ -69,7 +69,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBMLIB_IMAGE, \
|
||||
-D "JDK_INTERNAL_NAME=mlib_image" \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libmlib_image, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
$(BUILD_LIBMLIB_IMAGE): $(call FindLib, java.base, java)
|
||||
|
||||
@ -134,7 +134,7 @@ ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc)
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LIBS := -ljava -ljvm -lc $(BUILD_LIBMLIB_LDLIBS), \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libmlib_image_v, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
$(BUILD_LIBMLIB_IMAGE_V): $(call FindLib, java.base, java)
|
||||
|
||||
@ -279,7 +279,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBAWT, \
|
||||
-D "JDK_INTERNAL_NAME=awt" \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
$(BUILD_LIBAWT): $(call FindLib, java.base, java)
|
||||
|
||||
@ -369,7 +369,7 @@ ifeq ($(findstring $(OPENJDK_TARGET_OS),windows macosx),)
|
||||
-D "JDK_INTERNAL_NAME=xawt" \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt_xawt, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
$(BUILD_LIBAWT_XAWT): $(call FindLib, java.base, java)
|
||||
|
||||
@ -433,7 +433,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBLCMS, \
|
||||
-D "JDK_INTERNAL_NAME=lcms" \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/liblcms, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIBLCMS)
|
||||
|
||||
@ -509,7 +509,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVAJPEG, \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
REORDER := $(BUILD_LIBJAVAJPEG_REORDER), \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjavajpeg, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
$(BUILD_LIBJAVAJPEG): $(call FindLib, java.base, java)
|
||||
|
||||
@ -578,7 +578,7 @@ ifeq ($(BUILD_HEADLESS), true)
|
||||
LIBS_linux := -lm $(LIBDL), \
|
||||
LIBS_solaris := -lm $(LIBDL) $(LIBCXX) -lc, \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt_headless, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
$(BUILD_LIBAWT_HEADLESS): $(BUILD_LIBAWT)
|
||||
|
||||
@ -700,7 +700,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \
|
||||
-D "JDK_INTERNAL_NAME=fontmanager" \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfontmanager, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
$(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT)
|
||||
|
||||
@ -745,12 +745,13 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
-D "JDK_INTERNAL_NAME=jawt" \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjawt, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
$(BUILD_LIBJAWT): $(BUILD_LIBAWT)
|
||||
|
||||
$(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX): $(BUILD_LIBJAWT)
|
||||
$(ECHO) Copying $(@F)
|
||||
$(call LogInfo, Copying $(patsubst $(OUTPUT_ROOT)/%, %, $@))
|
||||
$(call MakeDir, $(@D))
|
||||
$(CP) $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjawt/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX) $@
|
||||
|
||||
TARGETS += $(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX)
|
||||
@ -804,7 +805,7 @@ else # OPENJDK_TARGET_OS not windows
|
||||
LIBS_solaris := $(X_LIBS) -lXrender, \
|
||||
LIBS_macosx := -framework Cocoa, \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjawt, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
ifndef BUILD_HEADLESS_ONLY
|
||||
$(BUILD_LIBJAWT): $(BUILD_LIBAWT_XAWT)
|
||||
@ -926,7 +927,7 @@ ifndef BUILD_HEADLESS_ONLY
|
||||
-D "JDK_INTERNAL_NAME=splashscreen" \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libsplashscreen, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIBSPLASHSCREEN)
|
||||
|
||||
@ -1002,7 +1003,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
-framework OpenGL \
|
||||
-framework QuartzCore -ljava, \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt_lwawt, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIBAWT_LWAWT)
|
||||
|
||||
@ -1044,7 +1045,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
-framework JavaRuntimeSupport \
|
||||
-ljava -ljvm, \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libosxui, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIBOSXUI)
|
||||
|
||||
|
@ -25,6 +25,10 @@
|
||||
|
||||
WIN_VERIFY_LIB := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libverify/verify.lib
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, jdk, lib/CoreLibraries.gmk))
|
||||
|
||||
|
||||
##########################################################################################
|
||||
# libfdlibm is statically linked with libjava below and not delivered into the
|
||||
# product on its own.
|
||||
@ -51,7 +55,7 @@ ifneq ($(OPENJDK_TARGET_OS), macosx)
|
||||
DISABLED_WARNINGS_microsoft := 4146 4244 4018, \
|
||||
ARFLAGS := $(ARFLAGS), \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
else
|
||||
|
||||
@ -64,7 +68,7 @@ else
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(LIBFDLIBM_CFLAGS), \
|
||||
LDFLAGS := -nostdlib -r -arch x86_64, \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
BUILD_LIBFDLIBM := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX)
|
||||
$(BUILD_LIBFDLIBM): $(BUILD_LIBFDLIBM_MAC)
|
||||
@ -82,7 +86,7 @@ endif
|
||||
|
||||
LIBVERIFY_OPTIMIZATION := HIGH
|
||||
ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
|
||||
ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
|
||||
ifeq ($(COMPILE_WITH_DEBUG_SYMBOLS), true)
|
||||
LIBVERIFY_OPTIMIZATION := LOW
|
||||
endif
|
||||
endif
|
||||
@ -106,7 +110,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBVERIFY, \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
REORDER := $(BUILD_LIBVERIFY_REORDER), \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libverify, \
|
||||
DEBUG_SYMBOLS := true))
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIBVERIFY)
|
||||
|
||||
@ -119,6 +123,9 @@ LIBJAVA_CFLAGS := $(addprefix -I, $(LIBJAVA_SRC_DIRS)) \
|
||||
-I$(SUPPORT_OUTPUTDIR)/headers/java.base \
|
||||
-DARCHPROPNAME='"$(OPENJDK_TARGET_CPU_OSARCH)"'
|
||||
|
||||
# Make it possible to override this variable
|
||||
LIBJAVA_MAPFILE ?= $(JDK_TOPDIR)/make/mapfiles/libjava/mapfile-vers
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
BUILD_LIBJAVA_java_props_md.c_CFLAGS := -x objective-c
|
||||
BUILD_LIBJAVA_java_props_macosx.c_CFLAGS := -x objective-c
|
||||
@ -146,7 +153,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \
|
||||
System.c_CFLAGS := $(VERSION_CFLAGS), \
|
||||
jdk_util.c_CFLAGS := $(VERSION_CFLAGS), \
|
||||
DISABLED_WARNINGS_solstudio := E_STATEMENT_NOT_REACHED, \
|
||||
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjava/mapfile-vers, \
|
||||
MAPFILE := $(LIBJAVA_MAPFILE), \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LDFLAGS_macosx := -L$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/, \
|
||||
@ -171,7 +178,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
REORDER := $(LIBJAVA_REORDER), \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIBJAVA)
|
||||
|
||||
@ -228,8 +235,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \
|
||||
-D "JDK_INTERNAL_NAME=zip" \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libzip, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
|
||||
))
|
||||
|
||||
$(BUILD_LIBZIP): $(BUILD_LIBJAVA)
|
||||
|
||||
@ -273,7 +279,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJIMAGE, \
|
||||
-D "JDK_INTERNAL_NAME=jimage" \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjimage, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
$(BUILD_LIBJIMAGE): $(BUILD_LIBJAVA)
|
||||
|
||||
@ -389,7 +395,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJLI, \
|
||||
-D "JDK_INTERNAL_NAME=jli" \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIBJLI)
|
||||
|
||||
@ -407,7 +413,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
CFLAGS := $(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS), \
|
||||
ARFLAGS := $(ARFLAGS), \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIBJLI_STATIC)
|
||||
|
||||
@ -426,7 +432,7 @@ else ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(LIBJLI_CFLAGS), \
|
||||
LDFLAGS := -nostdlib -r, \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
ifeq ($(STATIC_BUILD), true)
|
||||
TARGETS += $(BUILD_LIBJLI_STATIC)
|
||||
|
@ -49,7 +49,7 @@ ifeq ($(STATIC_BUILD), true)
|
||||
JAVA_BASE_EXPORT_SYMBOL_FILE := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base/java.base.symbols
|
||||
|
||||
$(JAVA_BASE_EXPORT_SYMBOL_FILE): $(JAVA_BASE_EXPORT_SYMBOLS_SRC)
|
||||
$(ECHO) $(LOG_INFO) "Generating java.base.symbols file"
|
||||
$(call LogInfo, Generating java.base.symbols file)
|
||||
$(CAT) $^ > $@
|
||||
|
||||
# The individual symbol files is generated when the respective lib is built
|
||||
|
@ -84,7 +84,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBINSTRUMENT, \
|
||||
-D "JDK_INTERNAL_NAME=instrument" \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libinstrument, \
|
||||
DEBUG_SYMBOLS := true))
|
||||
))
|
||||
|
||||
ifneq (, $(findstring $(OPENJDK_TARGET_OS), macosx windows aix))
|
||||
$(BUILD_LIBINSTRUMENT): $(SUPPORT_OUTPUTDIR)/native/java.base/$(LIBRARY_PREFIX)jli_static$(STATIC_LIBRARY_SUFFIX)
|
||||
|
@ -40,7 +40,7 @@ LIBMANAGEMENT_CFLAGS := -I$(JDK_TOPDIR)/src/java.management/share/native/include
|
||||
|
||||
LIBMANAGEMENT_OPTIMIZATION := HIGH
|
||||
ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
|
||||
ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
|
||||
ifeq ($(COMPILE_WITH_DEBUG_SYMBOLS), true)
|
||||
LIBMANAGEMENT_OPTIMIZATION := LOW
|
||||
endif
|
||||
endif
|
||||
@ -64,7 +64,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBMANAGEMENT, \
|
||||
-D "JDK_INTERNAL_NAME=management" \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libmanagement, \
|
||||
DEBUG_SYMBOLS := true))
|
||||
))
|
||||
|
||||
$(BUILD_LIBMANAGEMENT): $(call FindLib, java.base, java)
|
||||
|
||||
|
@ -55,7 +55,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBPREFS, \
|
||||
-D "JDK_INTERNAL_NAME=prefs" \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libprefs, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
$(BUILD_LIBPREFS): $(call FindLib, java.base, java)
|
||||
|
||||
|
@ -46,7 +46,7 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
|
||||
LIBS := $(LIBDL), \
|
||||
LIBS_solaris := -lc, \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libj2gss, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIBJ2GSS)
|
||||
endif
|
||||
@ -92,7 +92,7 @@ ifneq ($(BUILD_CRYPTO), no)
|
||||
-D "JDK_INTERNAL_NAME=$(BUILD_LIBKRB5_NAME)" \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libkrb5, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIBKRB5)
|
||||
endif
|
||||
|
@ -52,7 +52,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJ2PCSC, \
|
||||
-D "JDK_INTERNAL_NAME=j2pcsc" \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libj2pcsc, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIBJ2PCSC)
|
||||
|
||||
|
@ -61,7 +61,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
-D "JDK_INTERNAL_NAME=javaaccessbridge$1" \
|
||||
-D "JDK_FTYPE=0x02L", \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjavaaccessbridge$1, \
|
||||
DEBUG_SYMBOLS := true)
|
||||
)
|
||||
|
||||
$$(BUILD_JAVAACCESSBRIDGE$1): $(SUPPORT_OUTPUTDIR)/native/java.desktop/libjawt/jawt.lib
|
||||
|
||||
@ -91,7 +91,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
-D "JDK_INTERNAL_NAME=windowsaccessbridge$1" \
|
||||
-D "JDK_FTYPE=0x02L", \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libwindowsaccessbridge$1, \
|
||||
DEBUG_SYMBOLS := true)
|
||||
)
|
||||
|
||||
TARGETS += $$(BUILD_WINDOWSACCESSBRIDGE$1)
|
||||
|
||||
@ -113,7 +113,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
-D "JDK_INTERNAL_NAME=jabsysinfo" \
|
||||
-D "JDK_FTYPE=0x02L", \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/lib/libjabsysinfo, \
|
||||
DEBUG_SYMBOLS := true)
|
||||
)
|
||||
|
||||
TARGETS += $$(BUILD_ACCESSBRIDGESYSINFO)
|
||||
|
||||
|
@ -56,7 +56,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBATTACH, \
|
||||
LIBS_solaris := -ldoor, \
|
||||
LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib psapi.lib, \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libattach, \
|
||||
DEBUG_SYMBOLS := true))
|
||||
))
|
||||
|
||||
$(BUILD_LIBATTACH): $(call FindLib, java.base, java)
|
||||
|
||||
|
@ -68,7 +68,7 @@ ifeq ($(ENABLE_INTREE_EC), yes)
|
||||
-D "JDK_INTERNAL_NAME=sunec" \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libsunec, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIBSUNEC)
|
||||
endif
|
||||
|
@ -47,7 +47,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
-D "JDK_INTERNAL_NAME=sunmscapi" \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libsunmscapi, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIBSUNMSCAPI)
|
||||
endif
|
||||
|
@ -51,7 +51,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJ2PKCS11, \
|
||||
-D "JDK_INTERNAL_NAME=j2pkcs11" \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libj2pkcs11, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIBJ2PKCS11)
|
||||
|
||||
|
@ -44,7 +44,7 @@ ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
LIBS := $(LIBDL), \
|
||||
LIBS_solaris := -lc, \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libj2ucrypto, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
$(BUILD_LIBJ2UCRYPTO): $(BUILD_LIBJAVA)
|
||||
|
||||
|
@ -57,7 +57,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
-framework SystemConfiguration \
|
||||
$(JDKLIB_LIBS), \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libosx, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIBOSX)
|
||||
|
||||
|
@ -51,7 +51,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
-D "JDK_INTERNAL_NAME=le" \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/lible, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIBLE)
|
||||
|
||||
|
@ -55,7 +55,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
-D "JDK_INTERNAL_NAME=dt_shmem" \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libdt_shmem, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIBDT_SHMEM)
|
||||
|
||||
|
@ -56,7 +56,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBDT_SOCKET, \
|
||||
-D "JDK_INTERNAL_NAME=dt_socket" \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libdt_socket, \
|
||||
DEBUG_SYMBOLS := true))
|
||||
))
|
||||
|
||||
$(BUILD_LIBDT_SOCKET): $(call FindLib, java.base, java)
|
||||
|
||||
@ -95,7 +95,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJDWP, \
|
||||
-D "JDK_INTERNAL_NAME=jdwp" \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjdwp, \
|
||||
DEBUG_SYMBOLS := true))
|
||||
))
|
||||
|
||||
$(BUILD_LIBJDWP): $(call FindLib, java.base, java)
|
||||
|
||||
@ -111,7 +111,7 @@ ifeq ($(STATIC_BUILD), true)
|
||||
JDK_JDWP_AGENT_EXPORT_SYMBOL_FILE := $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.jdwp.agent/jdk.jdwp.agent.symbols
|
||||
|
||||
$(JDK_JDWP_AGENT_EXPORT_SYMBOL_FILE): $(JDK_JDWP_AGENT_EXPORT_SYMBOLS_SRC)
|
||||
$(ECHO) $(LOG_INFO) "Generating jdk.jdwp.agent symbols file"
|
||||
$(call LogInfo, Generating jdk.jdwp.agent symbols file)
|
||||
$(CAT) $^ > $@
|
||||
|
||||
# The individual symbol files is generated when the respective lib is built
|
||||
|
@ -48,7 +48,7 @@ endif
|
||||
|
||||
LIBMANAGEMENT_EXT_OPTIMIZATION := HIGH
|
||||
ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
|
||||
ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
|
||||
ifeq ($(COMPILE_WITH_DEBUG_SYMBOLS), true)
|
||||
LIBMANAGEMENT_EXT_OPTIMIZATION := LOW
|
||||
endif
|
||||
endif
|
||||
@ -73,7 +73,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBMANAGEMENT_EXT, \
|
||||
-D "JDK_INTERNAL_NAME=management_ext" \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libmanagement_ext, \
|
||||
DEBUG_SYMBOLS := true))
|
||||
))
|
||||
|
||||
$(BUILD_LIBMANAGEMENT_EXT): $(call FindLib, java.base, java)
|
||||
|
||||
|
@ -52,7 +52,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK, \
|
||||
-D "JDK_FNAME=unpack.dll" \
|
||||
-D "JDK_INTERNAL_NAME=unpack" \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
$(BUILD_LIBUNPACK): $(call FindLib, java.base, java)
|
||||
|
||||
|
@ -53,7 +53,7 @@ ifeq ($(OPENJDK_TARGET_OS_TYPE), unix)
|
||||
LIBS_linux := -lpthread $(LIBDL), \
|
||||
LIBS_solaris := -lsocket -lc, \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libsctp, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIBSCTP)
|
||||
|
||||
|
@ -55,7 +55,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAAS, \
|
||||
-D "JDK_INTERNAL_NAME=$(LIBJAAS_NAME)" \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjaas, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
$(BUILD_LIBJAAS): $(call FindLib, java.base, java)
|
||||
|
||||
|
@ -23,40 +23,24 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include NativeCompilation.gmk
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, jdk, lib/LibCommon.gmk))
|
||||
|
||||
################################################################################
|
||||
|
||||
GLOBAL_VERSION_INFO_RESOURCE := $(JDK_TOPDIR)/src/java.base/windows/native/common/version.rc
|
||||
|
||||
# Absolute paths to lib files on windows for use in LDFLAGS. Should figure out a more
|
||||
# elegant solution to this.
|
||||
WIN_JAVA_LIB := $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib
|
||||
|
||||
ifdef OPENJDK
|
||||
# Build everything with debugging on OpenJDK
|
||||
DEBUG_ALL_BINARIES := true
|
||||
else
|
||||
# Use this variable to set DEBUG_SYMBOLS true on windows for all libraries, but
|
||||
# not on other platforms.
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
DEBUG_ALL_BINARIES := true
|
||||
else
|
||||
DEBUG_ALL_BINARIES := false
|
||||
endif
|
||||
endif
|
||||
|
||||
# SetupNativeCompilation now supports debug symbols on macosx for hotspot.
|
||||
# Disable it here for the jdk libraries until we decide to enable them.
|
||||
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
ENABLE_DEBUG_SYMBOLS := false
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# Find the default set of src dirs for a native library.
|
||||
# Param 1 - module name
|
||||
# Param 2 - library name
|
||||
FindSrcDirsForLib = \
|
||||
FindSrcDirsForLib += \
|
||||
$(call uniq, $(wildcard \
|
||||
$(JDK_TOPDIR)/src/$(strip $1)/$(OPENJDK_TARGET_OS)/native/lib$(strip $2) \
|
||||
$(JDK_TOPDIR)/src/$(strip $1)/$(OPENJDK_TARGET_OS_TYPE)/native/lib$(strip $2) \
|
||||
@ -87,3 +71,5 @@ ifeq ($(USE_EXTERNAL_LIBZ), true)
|
||||
else
|
||||
ZLIB_CPPFLAGS := -I$(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib-1.2.8
|
||||
endif
|
||||
|
||||
###############################################################################
|
||||
|
@ -52,7 +52,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBNET, \
|
||||
-D "JDK_INTERNAL_NAME=net" \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libnet, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
$(BUILD_LIBNET): $(BUILD_LIBJAVA)
|
||||
|
||||
|
@ -91,7 +91,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBNIO, \
|
||||
-D "JDK_INTERNAL_NAME=nio" \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libnio, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIBNIO)
|
||||
|
||||
|
@ -54,7 +54,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
-framework IOSurface \
|
||||
-framework QuartzCore, \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libosxapp, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIBOSXAPP)
|
||||
|
||||
|
@ -54,7 +54,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
-framework Security \
|
||||
$(JDKLIB_LIBS), \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libosxsecurity, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
$(BUILD_LIBOSXSECURITY): $(BUILD_LIBJAVA)
|
||||
|
||||
|
@ -138,7 +138,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJSOUND, \
|
||||
-D "JDK_INTERNAL_NAME=jsound" \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjsound, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
$(BUILD_LIBJSOUND): $(BUILD_LIBJAVA)
|
||||
|
||||
@ -173,7 +173,7 @@ ifneq ($(filter jsoundalsa, $(EXTRA_SOUND_JNI_LIBS)), )
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LIBS := $(ALSA_LIBS) -ljava -ljvm, \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjsoundalsa, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
$(BUILD_LIBJSOUNDALSA): $(BUILD_LIBJAVA)
|
||||
|
||||
@ -204,7 +204,7 @@ ifneq ($(filter jsoundds, $(EXTRA_SOUND_JNI_LIBS)), )
|
||||
-D "JDK_INTERNAL_NAME=jsoundds" \
|
||||
-D "JDK_FTYPE=0x2L", \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjsoundds, \
|
||||
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
|
||||
))
|
||||
|
||||
$(BUILD_LIBJSOUNDDS): $(BUILD_LIBJAVA)
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2015, 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
|
||||
@ -32,9 +32,10 @@ import java.util.regex.*;
|
||||
* Spp: A simple regex-based stream preprocessor based on Mark Reinhold's
|
||||
* sed-based spp.sh
|
||||
*
|
||||
* Usage: java build.tools.spp.Spp [-be] [-Kkey] -Dvar=value ... <in >out
|
||||
* Usage: java build.tools.spp.Spp [-be] [-nel] [-Kkey] -Dvar=value ... <in >out
|
||||
*
|
||||
* Source-file constructs
|
||||
* If -nel is declared then empty lines will not be substituted for lines of
|
||||
* text in the template that do not appear in the output.
|
||||
*
|
||||
* Meaningful only at beginning of line, works with any number of keys:
|
||||
*
|
||||
@ -64,9 +65,10 @@ import java.util.regex.*;
|
||||
|
||||
public class Spp {
|
||||
public static void main(String args[]) throws Exception {
|
||||
Map<String, String> vars = new HashMap<String, String>();
|
||||
Set<String> keys = new HashSet<String>();
|
||||
Map<String, String> vars = new HashMap<>();
|
||||
Set<String> keys = new HashSet<>();
|
||||
boolean be = false;
|
||||
boolean el = true;
|
||||
|
||||
for (String arg:args) {
|
||||
if (arg.startsWith("-D")) {
|
||||
@ -76,8 +78,10 @@ public class Spp {
|
||||
keys.add(arg.substring(2));
|
||||
} else if ("-be".equals(arg)) {
|
||||
be = true;
|
||||
} else if ("-nel".equals(arg)) {
|
||||
el = false;
|
||||
} else {
|
||||
System.err.println("Usage: java build.tools.spp.Spp [-be] [-Kkey] -Dvar=value ... <in >out");
|
||||
System.err.println("Usage: java build.tools.spp.Spp [-be] [-nel] [-Kkey] -Dvar=value ... <in >out");
|
||||
System.exit(-1);
|
||||
}
|
||||
}
|
||||
@ -85,7 +89,7 @@ public class Spp {
|
||||
StringBuffer out = new StringBuffer();
|
||||
new Spp().spp(new Scanner(System.in),
|
||||
out, "",
|
||||
keys, vars, be,
|
||||
keys, vars, be, el,
|
||||
false);
|
||||
System.out.print(out.toString());
|
||||
}
|
||||
@ -93,7 +97,7 @@ public class Spp {
|
||||
static final String LNSEP = System.getProperty("line.separator");
|
||||
static final String KEY = "([a-zA-Z0-9]+)";
|
||||
static final String VAR = "([a-zA-Z0-9_\\-]+)";
|
||||
static final String TEXT = "([a-zA-Z0-9&;,.<>/#() \\$]+)"; // $ -- hack embedded $var$
|
||||
static final String TEXT = "([a-zA-Z0-9&;,.<>/#() \\?\\[\\]\\$]+)"; // $ -- hack embedded $var$
|
||||
|
||||
static final int GN_NOT = 1;
|
||||
static final int GN_KEY = 2;
|
||||
@ -101,11 +105,11 @@ public class Spp {
|
||||
static final int GN_NO = 5;
|
||||
static final int GN_VAR = 6;
|
||||
|
||||
Matcher ifkey = Pattern.compile("^#if\\[(!)?" + KEY + "\\]").matcher("");
|
||||
Matcher elsekey = Pattern.compile("^#else\\[(!)?" + KEY + "\\]").matcher("");
|
||||
Matcher endkey = Pattern.compile("^#end\\[(!)?" + KEY + "\\]").matcher("");
|
||||
Matcher vardef = Pattern.compile("\\{#if\\[(!)?" + KEY + "\\]\\?" + TEXT + "(:"+ TEXT + ")?\\}|\\$" + VAR + "\\$").matcher("");
|
||||
Matcher vardef2 = Pattern.compile("\\$" + VAR + "\\$").matcher("");
|
||||
final Matcher ifkey = Pattern.compile("^#if\\[(!)?" + KEY + "\\]").matcher("");
|
||||
final Matcher elsekey = Pattern.compile("^#else\\[(!)?" + KEY + "\\]").matcher("");
|
||||
final Matcher endkey = Pattern.compile("^#end\\[(!)?" + KEY + "\\]").matcher("");
|
||||
final Matcher vardef = Pattern.compile("\\{#if\\[(!)?" + KEY + "\\]\\?" + TEXT + "(:"+ TEXT + ")?\\}|\\$" + VAR + "\\$").matcher("");
|
||||
final Matcher vardef2 = Pattern.compile("\\$" + VAR + "\\$").matcher("");
|
||||
|
||||
void append(StringBuffer buf, String ln,
|
||||
Set<String> keys, Map<String, String> vars) {
|
||||
@ -135,7 +139,7 @@ public class Spp {
|
||||
// return true if #end[key], #end or EOF reached
|
||||
boolean spp(Scanner in, StringBuffer buf, String key,
|
||||
Set<String> keys, Map<String, String> vars,
|
||||
boolean be, boolean skip) {
|
||||
boolean be, boolean el, boolean skip) {
|
||||
while (in.hasNextLine()) {
|
||||
String ln = in.nextLine();
|
||||
if (be) {
|
||||
@ -154,9 +158,9 @@ public class Spp {
|
||||
boolean test = keys.contains(k);
|
||||
if (ifkey.group(GN_NOT) != null)
|
||||
test = !test;
|
||||
buf.append(LNSEP);
|
||||
if (!spp(in, buf, k, keys, vars, be, skip || !test)) {
|
||||
spp(in, buf, k, keys, vars, be, skip || test);
|
||||
if (el) buf.append(LNSEP);
|
||||
if (!spp(in, buf, k, keys, vars, be, el, skip || !test)) {
|
||||
spp(in, buf, k, keys, vars, be, el, skip || test);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
@ -164,14 +168,14 @@ public class Spp {
|
||||
if (!key.equals(elsekey.group(GN_KEY))) {
|
||||
throw new Error("Mis-matched #if-else-end at line <" + ln + ">");
|
||||
}
|
||||
buf.append(LNSEP);
|
||||
if (el) buf.append(LNSEP);
|
||||
return false;
|
||||
}
|
||||
if (endkey.reset(ln).find()) {
|
||||
if (!key.equals(endkey.group(GN_KEY))) {
|
||||
throw new Error("Mis-matched #if-else-end at line <" + ln + ">");
|
||||
}
|
||||
buf.append(LNSEP);
|
||||
if (el) buf.append(LNSEP);
|
||||
return true;
|
||||
}
|
||||
if (ln.startsWith("#warn")) {
|
||||
@ -181,8 +185,9 @@ public class Spp {
|
||||
}
|
||||
if (!skip) {
|
||||
append(buf, ln, keys, vars);
|
||||
if (!el) buf.append(LNSEP);
|
||||
}
|
||||
buf.append(LNSEP);
|
||||
if (el) buf.append(LNSEP);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ import java.time.zone.ZoneRulesException;
|
||||
* @author Stephen Colebourne
|
||||
* @author Michael Nascimento Santos
|
||||
*
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
|
||||
class TzdbZoneRulesProvider {
|
||||
|
@ -26,7 +26,9 @@
|
||||
package com.sun.crypto.provider;
|
||||
|
||||
import java.security.InvalidKeyException;
|
||||
import java.util.Objects;
|
||||
|
||||
import jdk.internal.HotSpotIntrinsicCandidate;
|
||||
|
||||
/**
|
||||
* This class represents ciphers in counter (CTR) mode.
|
||||
@ -138,7 +140,7 @@ final class CounterMode extends FeedbackCipher {
|
||||
* <code>cipherOffset</code>.
|
||||
*
|
||||
* @param in the buffer with the input data to be encrypted
|
||||
* @param inOffset the offset in <code>plain</code>
|
||||
* @param inOff the offset in <code>plain</code>
|
||||
* @param len the length of the input data
|
||||
* @param out the buffer for the result
|
||||
* @param outOff the offset in <code>cipher</code>
|
||||
@ -170,6 +172,15 @@ final class CounterMode extends FeedbackCipher {
|
||||
* are encrypted on demand.
|
||||
*/
|
||||
private int crypt(byte[] in, int inOff, int len, byte[] out, int outOff) {
|
||||
|
||||
cryptBlockCheck(in, inOff, len);
|
||||
cryptBlockCheck(out, outOff, len);
|
||||
return implCrypt(in, inOff, len, out, outOff);
|
||||
}
|
||||
|
||||
// Implementation of crpyt() method. Possibly replaced with a compiler intrinsic.
|
||||
@HotSpotIntrinsicCandidate
|
||||
private int implCrypt(byte[] in, int inOff, int len, byte[] out, int outOff) {
|
||||
int result = len;
|
||||
while (len-- > 0) {
|
||||
if (used >= blockSize) {
|
||||
@ -181,4 +192,23 @@ final class CounterMode extends FeedbackCipher {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// Used to perform all checks required by the Java semantics
|
||||
// (i.e., null checks and bounds checks) on the input parameters to crypt().
|
||||
// Normally, the Java Runtime performs these checks, however, as crypt() is
|
||||
// possibly replaced with compiler intrinsic, the JDK performs the
|
||||
// required checks instead.
|
||||
// Does not check accesses to class-internal (private) arrays.
|
||||
private static void cryptBlockCheck(byte[] array, int offset, int len) {
|
||||
Objects.requireNonNull(array);
|
||||
|
||||
if (offset < 0 || len < 0 || offset >= array.length) {
|
||||
throw new ArrayIndexOutOfBoundsException(offset);
|
||||
}
|
||||
|
||||
int largestIndex = offset + len - 1;
|
||||
if (largestIndex < 0 || largestIndex >= array.length) {
|
||||
throw new ArrayIndexOutOfBoundsException(largestIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2015, 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
|
||||
@ -263,7 +263,7 @@ abstract class PBES2Core extends CipherSpi {
|
||||
passwdChars[i] = (char) (passwdBytes[i] & 0x7f);
|
||||
|
||||
PBEKeySpec pbeSpec =
|
||||
new PBEKeySpec(passwdChars, salt, iCount, blkSize * 8);
|
||||
new PBEKeySpec(passwdChars, salt, iCount, keyLength);
|
||||
// password char[] was cloned in PBEKeySpec constructor,
|
||||
// so we can zero it out here
|
||||
java.util.Arrays.fill(passwdChars, ' ');
|
||||
|
@ -76,11 +76,14 @@ public final class TlsRsaPremasterSecretGenerator extends KeyGeneratorSpi {
|
||||
"TlsRsaPremasterSecretGenerator must be initialized");
|
||||
}
|
||||
|
||||
if (random == null) {
|
||||
random = new SecureRandom();
|
||||
byte[] b = spec.getEncodedSecret();
|
||||
if (b == null) {
|
||||
if (random == null) {
|
||||
random = new SecureRandom();
|
||||
}
|
||||
b = new byte[48];
|
||||
random.nextBytes(b);
|
||||
}
|
||||
byte[] b = new byte[48];
|
||||
random.nextBytes(b);
|
||||
b[0] = (byte)spec.getMajorVersion();
|
||||
b[1] = (byte)spec.getMinorVersion();
|
||||
|
||||
|
@ -228,7 +228,7 @@ public abstract class InputStream implements Closeable {
|
||||
* allocated. For example, if an array larger than {@code 2GB} would
|
||||
* be required to store the bytes.
|
||||
*
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public byte[] readAllBytes() throws IOException {
|
||||
byte[] buf = new byte[DEFAULT_BUFFER_SIZE];
|
||||
@ -298,7 +298,7 @@ public abstract class InputStream implements Closeable {
|
||||
* @throws IndexOutOfBoundsException If {@code off} is negative, {@code len}
|
||||
* is negative, or {@code len} is greater than {@code b.length - off}
|
||||
*
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public int readNBytes(byte[] b, int off, int len) throws IOException {
|
||||
Objects.requireNonNull(b);
|
||||
@ -514,7 +514,7 @@ public abstract class InputStream implements Closeable {
|
||||
* @throws IOException if an I/O error occurs when reading or writing
|
||||
* @throws NullPointerException if {@code out} is {@code null}
|
||||
*
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public long transferTo(OutputStream out) throws IOException {
|
||||
Objects.requireNonNull(out, "out");
|
||||
|
@ -1526,7 +1526,7 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence {
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
@Override
|
||||
public IntStream chars() {
|
||||
@ -1543,7 +1543,7 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence {
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
@Override
|
||||
public IntStream codePoints() {
|
||||
|
@ -493,25 +493,25 @@ class Character implements java.io.Serializable, Comparable<Character> {
|
||||
|
||||
/**
|
||||
* Weak bidirectional character type "LRI" in the Unicode specification.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final byte DIRECTIONALITY_LEFT_TO_RIGHT_ISOLATE = 19;
|
||||
|
||||
/**
|
||||
* Weak bidirectional character type "RLI" in the Unicode specification.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_ISOLATE = 20;
|
||||
|
||||
/**
|
||||
* Weak bidirectional character type "FSI" in the Unicode specification.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final byte DIRECTIONALITY_FIRST_STRONG_ISOLATE = 21;
|
||||
|
||||
/**
|
||||
* Weak bidirectional character type "PDI" in the Unicode specification.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final byte DIRECTIONALITY_POP_DIRECTIONAL_ISOLATE = 22;
|
||||
|
||||
@ -2590,7 +2590,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
|
||||
/**
|
||||
* Constant for the "Combining Diacritical Marks Extended" Unicode
|
||||
* character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock COMBINING_DIACRITICAL_MARKS_EXTENDED =
|
||||
new UnicodeBlock("COMBINING_DIACRITICAL_MARKS_EXTENDED",
|
||||
@ -2599,7 +2599,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
|
||||
|
||||
/**
|
||||
* Constant for the "Myanmar Extended-B" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock MYANMAR_EXTENDED_B =
|
||||
new UnicodeBlock("MYANMAR_EXTENDED_B",
|
||||
@ -2608,7 +2608,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
|
||||
|
||||
/**
|
||||
* Constant for the "Latin Extended-E" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock LATIN_EXTENDED_E =
|
||||
new UnicodeBlock("LATIN_EXTENDED_E",
|
||||
@ -2617,7 +2617,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
|
||||
|
||||
/**
|
||||
* Constant for the "Coptic Epact Numbers" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock COPTIC_EPACT_NUMBERS =
|
||||
new UnicodeBlock("COPTIC_EPACT_NUMBERS",
|
||||
@ -2626,7 +2626,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
|
||||
|
||||
/**
|
||||
* Constant for the "Old Permic" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock OLD_PERMIC =
|
||||
new UnicodeBlock("OLD_PERMIC",
|
||||
@ -2635,14 +2635,14 @@ class Character implements java.io.Serializable, Comparable<Character> {
|
||||
|
||||
/**
|
||||
* Constant for the "Elbasan" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock ELBASAN =
|
||||
new UnicodeBlock("ELBASAN");
|
||||
|
||||
/**
|
||||
* Constant for the "Caucasian Albanian" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock CAUCASIAN_ALBANIAN =
|
||||
new UnicodeBlock("CAUCASIAN_ALBANIAN",
|
||||
@ -2651,7 +2651,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
|
||||
|
||||
/**
|
||||
* Constant for the "Linear A" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock LINEAR_A =
|
||||
new UnicodeBlock("LINEAR_A",
|
||||
@ -2660,21 +2660,21 @@ class Character implements java.io.Serializable, Comparable<Character> {
|
||||
|
||||
/**
|
||||
* Constant for the "Palmyrene" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock PALMYRENE =
|
||||
new UnicodeBlock("PALMYRENE");
|
||||
|
||||
/**
|
||||
* Constant for the "Nabataean" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock NABATAEAN =
|
||||
new UnicodeBlock("NABATAEAN");
|
||||
|
||||
/**
|
||||
* Constant for the "Old North Arabian" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock OLD_NORTH_ARABIAN =
|
||||
new UnicodeBlock("OLD_NORTH_ARABIAN",
|
||||
@ -2683,14 +2683,14 @@ class Character implements java.io.Serializable, Comparable<Character> {
|
||||
|
||||
/**
|
||||
* Constant for the "Manichaean" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock MANICHAEAN =
|
||||
new UnicodeBlock("MANICHAEAN");
|
||||
|
||||
/**
|
||||
* Constant for the "Psalter Pahlavi" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock PSALTER_PAHLAVI =
|
||||
new UnicodeBlock("PSALTER_PAHLAVI",
|
||||
@ -2699,14 +2699,14 @@ class Character implements java.io.Serializable, Comparable<Character> {
|
||||
|
||||
/**
|
||||
* Constant for the "Mahajani" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock MAHAJANI =
|
||||
new UnicodeBlock("MAHAJANI");
|
||||
|
||||
/**
|
||||
* Constant for the "Sinhala Archaic Numbers" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock SINHALA_ARCHAIC_NUMBERS =
|
||||
new UnicodeBlock("SINHALA_ARCHAIC_NUMBERS",
|
||||
@ -2715,49 +2715,49 @@ class Character implements java.io.Serializable, Comparable<Character> {
|
||||
|
||||
/**
|
||||
* Constant for the "Khojki" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock KHOJKI =
|
||||
new UnicodeBlock("KHOJKI");
|
||||
|
||||
/**
|
||||
* Constant for the "Khudawadi" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock KHUDAWADI =
|
||||
new UnicodeBlock("KHUDAWADI");
|
||||
|
||||
/**
|
||||
* Constant for the "Grantha" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock GRANTHA =
|
||||
new UnicodeBlock("GRANTHA");
|
||||
|
||||
/**
|
||||
* Constant for the "Tirhuta" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock TIRHUTA =
|
||||
new UnicodeBlock("TIRHUTA");
|
||||
|
||||
/**
|
||||
* Constant for the "Siddham" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock SIDDHAM =
|
||||
new UnicodeBlock("SIDDHAM");
|
||||
|
||||
/**
|
||||
* Constant for the "Modi" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock MODI =
|
||||
new UnicodeBlock("MODI");
|
||||
|
||||
/**
|
||||
* Constant for the "Warang Citi" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock WARANG_CITI =
|
||||
new UnicodeBlock("WARANG_CITI",
|
||||
@ -2766,7 +2766,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
|
||||
|
||||
/**
|
||||
* Constant for the "Pau Cin Hau" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock PAU_CIN_HAU =
|
||||
new UnicodeBlock("PAU_CIN_HAU",
|
||||
@ -2775,14 +2775,14 @@ class Character implements java.io.Serializable, Comparable<Character> {
|
||||
|
||||
/**
|
||||
* Constant for the "Mro" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock MRO =
|
||||
new UnicodeBlock("MRO");
|
||||
|
||||
/**
|
||||
* Constant for the "Bassa Vah" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock BASSA_VAH =
|
||||
new UnicodeBlock("BASSA_VAH",
|
||||
@ -2791,7 +2791,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
|
||||
|
||||
/**
|
||||
* Constant for the "Pahawh Hmong" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock PAHAWH_HMONG =
|
||||
new UnicodeBlock("PAHAWH_HMONG",
|
||||
@ -2800,14 +2800,14 @@ class Character implements java.io.Serializable, Comparable<Character> {
|
||||
|
||||
/**
|
||||
* Constant for the "Duployan" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock DUPLOYAN =
|
||||
new UnicodeBlock("DUPLOYAN");
|
||||
|
||||
/**
|
||||
* Constant for the "Shorthand Format Controls" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock SHORTHAND_FORMAT_CONTROLS =
|
||||
new UnicodeBlock("SHORTHAND_FORMAT_CONTROLS",
|
||||
@ -2816,7 +2816,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
|
||||
|
||||
/**
|
||||
* Constant for the "Mende Kikakui" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock MENDE_KIKAKUI =
|
||||
new UnicodeBlock("MENDE_KIKAKUI",
|
||||
@ -2825,7 +2825,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
|
||||
|
||||
/**
|
||||
* Constant for the "Ornamental Dingbats" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock ORNAMENTAL_DINGBATS =
|
||||
new UnicodeBlock("ORNAMENTAL_DINGBATS",
|
||||
@ -2834,7 +2834,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
|
||||
|
||||
/**
|
||||
* Constant for the "Geometric Shapes Extended" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock GEOMETRIC_SHAPES_EXTENDED =
|
||||
new UnicodeBlock("GEOMETRIC_SHAPES_EXTENDED",
|
||||
@ -2843,7 +2843,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
|
||||
|
||||
/**
|
||||
* Constant for the "Supplemental Arrows-C" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock SUPPLEMENTAL_ARROWS_C =
|
||||
new UnicodeBlock("SUPPLEMENTAL_ARROWS_C",
|
||||
@ -2852,7 +2852,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
|
||||
|
||||
/**
|
||||
* Constant for the "Cherokee Supplement" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock CHEROKEE_SUPPLEMENT =
|
||||
new UnicodeBlock("CHEROKEE_SUPPLEMENT",
|
||||
@ -2861,14 +2861,14 @@ class Character implements java.io.Serializable, Comparable<Character> {
|
||||
|
||||
/**
|
||||
* Constant for the "Hatran" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock HATRAN =
|
||||
new UnicodeBlock("HATRAN");
|
||||
|
||||
/**
|
||||
* Constant for the "Old Hungarian" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock OLD_HUNGARIAN =
|
||||
new UnicodeBlock("OLD_HUNGARIAN",
|
||||
@ -2877,21 +2877,21 @@ class Character implements java.io.Serializable, Comparable<Character> {
|
||||
|
||||
/**
|
||||
* Constant for the "Multani" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock MULTANI =
|
||||
new UnicodeBlock("MULTANI");
|
||||
|
||||
/**
|
||||
* Constant for the "Ahom" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock AHOM =
|
||||
new UnicodeBlock("AHOM");
|
||||
|
||||
/**
|
||||
* Constant for the "Early Dynastic Cuneiform" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock EARLY_DYNASTIC_CUNEIFORM =
|
||||
new UnicodeBlock("EARLY_DYNASTIC_CUNEIFORM",
|
||||
@ -2900,7 +2900,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
|
||||
|
||||
/**
|
||||
* Constant for the "Anatolian Hieroglyphs" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock ANATOLIAN_HIEROGLYPHS =
|
||||
new UnicodeBlock("ANATOLIAN_HIEROGLYPHS",
|
||||
@ -2909,7 +2909,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
|
||||
|
||||
/**
|
||||
* Constant for the "Sutton SignWriting" Unicode character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock SUTTON_SIGNWRITING =
|
||||
new UnicodeBlock("SUTTON_SIGNWRITING",
|
||||
@ -2919,7 +2919,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
|
||||
/**
|
||||
* Constant for the "Supplemental Symbols and Pictographs" Unicode
|
||||
* character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock SUPPLEMENTAL_SYMBOLS_AND_PICTOGRAPHS =
|
||||
new UnicodeBlock("SUPPLEMENTAL_SYMBOLS_AND_PICTOGRAPHS",
|
||||
@ -2929,7 +2929,7 @@ class Character implements java.io.Serializable, Comparable<Character> {
|
||||
/**
|
||||
* Constant for the "CJK Unified Ideographs Extension E" Unicode
|
||||
* character block.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_E =
|
||||
new UnicodeBlock("CJK_UNIFIED_IDEOGRAPHS_EXTENSION_E",
|
||||
@ -4189,175 +4189,175 @@ class Character implements java.io.Serializable, Comparable<Character> {
|
||||
|
||||
/**
|
||||
* Unicode script "Caucasian Albanian".
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
CAUCASIAN_ALBANIAN,
|
||||
|
||||
/**
|
||||
* Unicode script "Bassa Vah".
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
BASSA_VAH,
|
||||
|
||||
/**
|
||||
* Unicode script "Duployan".
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
DUPLOYAN,
|
||||
|
||||
/**
|
||||
* Unicode script "Elbasan".
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
ELBASAN,
|
||||
|
||||
/**
|
||||
* Unicode script "Grantha".
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
GRANTHA,
|
||||
|
||||
/**
|
||||
* Unicode script "Pahawh Hmong".
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
PAHAWH_HMONG,
|
||||
|
||||
/**
|
||||
* Unicode script "Khojki".
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
KHOJKI,
|
||||
|
||||
/**
|
||||
* Unicode script "Linear A".
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
LINEAR_A,
|
||||
|
||||
/**
|
||||
* Unicode script "Mahajani".
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
MAHAJANI,
|
||||
|
||||
/**
|
||||
* Unicode script "Manichaean".
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
MANICHAEAN,
|
||||
|
||||
/**
|
||||
* Unicode script "Mende Kikakui".
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
MENDE_KIKAKUI,
|
||||
|
||||
/**
|
||||
* Unicode script "Modi".
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
MODI,
|
||||
|
||||
/**
|
||||
* Unicode script "Mro".
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
MRO,
|
||||
|
||||
/**
|
||||
* Unicode script "Old North Arabian".
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
OLD_NORTH_ARABIAN,
|
||||
|
||||
/**
|
||||
* Unicode script "Nabataean".
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
NABATAEAN,
|
||||
|
||||
/**
|
||||
* Unicode script "Palmyrene".
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
PALMYRENE,
|
||||
|
||||
/**
|
||||
* Unicode script "Pau Cin Hau".
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
PAU_CIN_HAU,
|
||||
|
||||
/**
|
||||
* Unicode script "Old Permic".
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
OLD_PERMIC,
|
||||
|
||||
/**
|
||||
* Unicode script "Psalter Pahlavi".
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
PSALTER_PAHLAVI,
|
||||
|
||||
/**
|
||||
* Unicode script "Siddham".
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
SIDDHAM,
|
||||
|
||||
/**
|
||||
* Unicode script "Khudawadi".
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
KHUDAWADI,
|
||||
|
||||
/**
|
||||
* Unicode script "Tirhuta".
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
TIRHUTA,
|
||||
|
||||
/**
|
||||
* Unicode script "Warang Citi".
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
WARANG_CITI,
|
||||
|
||||
/**
|
||||
* Unicode script "Ahom".
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
AHOM,
|
||||
|
||||
/**
|
||||
* Unicode script "Anatolian Hieroglyphs".
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
ANATOLIAN_HIEROGLYPHS,
|
||||
|
||||
/**
|
||||
* Unicode script "Hatran".
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
HATRAN,
|
||||
|
||||
/**
|
||||
* Unicode script "Multani".
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
MULTANI,
|
||||
|
||||
/**
|
||||
* Unicode script "Old Hungarian".
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
OLD_HUNGARIAN,
|
||||
|
||||
/**
|
||||
* Unicode script "SignWriting".
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
SIGNWRITING,
|
||||
|
||||
|
@ -716,7 +716,7 @@ public final class Integer extends Number implements Comparable<Integer> {
|
||||
* {@code radix}, or if {@code radix} is either smaller than
|
||||
* {@link java.lang.Character#MIN_RADIX} or larger than
|
||||
* {@link java.lang.Character#MAX_RADIX}.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static int parseInt(CharSequence s, int beginIndex, int endIndex, int radix)
|
||||
throws NumberFormatException {
|
||||
@ -899,7 +899,7 @@ public final class Integer extends Number implements Comparable<Integer> {
|
||||
* {@code radix}, or if {@code radix} is either smaller than
|
||||
* {@link java.lang.Character#MIN_RADIX} or larger than
|
||||
* {@link java.lang.Character#MAX_RADIX}.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static int parseUnsignedInt(CharSequence s, int beginIndex, int endIndex, int radix)
|
||||
throws NumberFormatException {
|
||||
|
@ -747,7 +747,7 @@ public final class Long extends Number implements Comparable<Long> {
|
||||
* {@code radix}, or if {@code radix} is either smaller than
|
||||
* {@link java.lang.Character#MIN_RADIX} or larger than
|
||||
* {@link java.lang.Character#MAX_RADIX}.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static long parseLong(CharSequence s, int beginIndex, int endIndex, int radix)
|
||||
throws NumberFormatException {
|
||||
@ -993,7 +993,7 @@ public final class Long extends Number implements Comparable<Long> {
|
||||
* {@code radix}, or if {@code radix} is either smaller than
|
||||
* {@link java.lang.Character#MIN_RADIX} or larger than
|
||||
* {@link java.lang.Character#MAX_RADIX}.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static long parseUnsignedLong(CharSequence s, int beginIndex, int endIndex, int radix)
|
||||
throws NumberFormatException {
|
||||
|
@ -304,7 +304,7 @@ public abstract class Process {
|
||||
* otherwise, {@link #destroy} forcibly terminates the process
|
||||
* @throws UnsupportedOperationException if the Process implementation
|
||||
* does not support this operation
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public boolean supportsNormalTermination() {
|
||||
throw new UnsupportedOperationException(this.getClass()
|
||||
@ -340,7 +340,7 @@ public abstract class Process {
|
||||
* @return the native process id of the process
|
||||
* @throws UnsupportedOperationException if the Process implementation
|
||||
* does not support this operation
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public long getPid() {
|
||||
return toHandle().getPid();
|
||||
@ -409,7 +409,7 @@ public abstract class Process {
|
||||
*
|
||||
* @return a new {@code CompletableFuture<Process>} for the Process
|
||||
*
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public CompletableFuture<Process> onExit() {
|
||||
return CompletableFuture.supplyAsync(this::waitForInternal);
|
||||
@ -471,7 +471,7 @@ public abstract class Process {
|
||||
* does not support this operation
|
||||
* @throws SecurityException if a security manager has been installed and
|
||||
* it denies RuntimePermission("manageProcess")
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public ProcessHandle toHandle() {
|
||||
throw new UnsupportedOperationException(this.getClass()
|
||||
@ -491,7 +491,7 @@ public abstract class Process {
|
||||
* @return a snapshot of information about the process, always non-null
|
||||
* @throws UnsupportedOperationException if the Process implementation
|
||||
* does not support this operation
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public ProcessHandle.Info info() {
|
||||
return toHandle().info();
|
||||
@ -516,7 +516,7 @@ public abstract class Process {
|
||||
* does not support this operation
|
||||
* @throws SecurityException if a security manager has been installed and
|
||||
* it denies RuntimePermission("manageProcess")
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public Stream<ProcessHandle> children() {
|
||||
return toHandle().children();
|
||||
@ -542,7 +542,7 @@ public abstract class Process {
|
||||
* does not support this operation
|
||||
* @throws SecurityException if a security manager has been installed and
|
||||
* it denies RuntimePermission("manageProcess")
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public Stream<ProcessHandle> descendants() {
|
||||
return toHandle().descendants();
|
||||
|
@ -89,7 +89,7 @@ import java.util.stream.Stream;
|
||||
* {@link #compareTo(ProcessHandle) compareTo} methods to compare ProcessHandles.
|
||||
*
|
||||
* @see Process
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public interface ProcessHandle extends Comparable<ProcessHandle> {
|
||||
|
||||
@ -215,7 +215,7 @@ public interface ProcessHandle extends Comparable<ProcessHandle> {
|
||||
* by the operating system privileges of the process making the request.
|
||||
* The return types are {@code Optional<T>} allowing explicit tests
|
||||
* and actions if the value is available.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public interface Info {
|
||||
/**
|
||||
|
@ -50,7 +50,7 @@ import static java.security.AccessController.doPrivileged;
|
||||
* ProcessHandleImpl is the implementation of ProcessHandle.
|
||||
*
|
||||
* @see Process
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
final class ProcessHandleImpl implements ProcessHandle {
|
||||
/**
|
||||
@ -338,7 +338,7 @@ final class ProcessHandleImpl implements ProcessHandle {
|
||||
*
|
||||
* @return {@code true} if the process represented by this
|
||||
* {@code ProcessHandle} object has not yet terminated.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
@Override
|
||||
public boolean isAlive() {
|
||||
|
@ -81,7 +81,7 @@ import java.util.stream.Stream;
|
||||
* will cause a {@link NullPointerException NullPointerException}
|
||||
* to be thrown.
|
||||
*
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public final class StackWalker {
|
||||
/**
|
||||
@ -92,7 +92,7 @@ public final class StackWalker {
|
||||
* by the {@linkplain Option stack walking options} of a {@linkplain
|
||||
* StackWalker stack walker}.
|
||||
*
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
* @jvms 2.6
|
||||
*/
|
||||
public static interface StackFrame {
|
||||
@ -185,7 +185,7 @@ public final class StackWalker {
|
||||
* Stack walker option to configure the {@linkplain StackFrame stack frame}
|
||||
* information obtained by a {@code StackWalker}.
|
||||
*
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public enum Option {
|
||||
/**
|
||||
|
@ -2674,7 +2674,7 @@ public final class String
|
||||
* point</a> is passed through uninterpreted.
|
||||
*
|
||||
* @return an IntStream of char values from this sequence
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
@Override
|
||||
public IntStream chars() {
|
||||
@ -2694,7 +2694,7 @@ public final class String
|
||||
* {@code int} values which are then passed to the stream.
|
||||
*
|
||||
* @return an IntStream of Unicode code points from this sequence
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
@Override
|
||||
public IntStream codePoints() {
|
||||
|
@ -25,25 +25,25 @@
|
||||
|
||||
package java.lang.invoke;
|
||||
|
||||
import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
||||
import static java.lang.invoke.LambdaForm.*;
|
||||
import static java.lang.invoke.LambdaForm.BasicType.*;
|
||||
import static java.lang.invoke.MethodHandleStatics.*;
|
||||
import jdk.internal.vm.annotation.Stable;
|
||||
import jdk.internal.org.objectweb.asm.ClassWriter;
|
||||
import jdk.internal.org.objectweb.asm.FieldVisitor;
|
||||
import jdk.internal.org.objectweb.asm.MethodVisitor;
|
||||
import sun.invoke.util.ValueConversions;
|
||||
import sun.invoke.util.Wrapper;
|
||||
|
||||
import java.lang.invoke.LambdaForm.NamedFunction;
|
||||
import java.lang.invoke.MethodHandles.Lookup;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.Arrays;
|
||||
import java.util.function.Function;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
import java.util.function.Function;
|
||||
|
||||
import jdk.internal.org.objectweb.asm.FieldVisitor;
|
||||
import sun.invoke.util.ValueConversions;
|
||||
import sun.invoke.util.Wrapper;
|
||||
|
||||
import jdk.internal.org.objectweb.asm.ClassWriter;
|
||||
import jdk.internal.org.objectweb.asm.MethodVisitor;
|
||||
import static java.lang.invoke.LambdaForm.BasicType;
|
||||
import static java.lang.invoke.LambdaForm.BasicType.*;
|
||||
import static java.lang.invoke.MethodHandleStatics.*;
|
||||
import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
||||
|
||||
/**
|
||||
* The flavor of method handle which emulates an invoke instruction
|
||||
@ -459,7 +459,7 @@ import jdk.internal.org.objectweb.asm.MethodVisitor;
|
||||
static final String BMH_SIG = "L"+BMH+";";
|
||||
static final String SPECIES_DATA = "java/lang/invoke/BoundMethodHandle$SpeciesData";
|
||||
static final String SPECIES_DATA_SIG = "L"+SPECIES_DATA+";";
|
||||
static final String STABLE_SIG = "Ljava/lang/invoke/Stable;";
|
||||
static final String STABLE_SIG = "Ljdk/internal/vm/annotation/Stable;";
|
||||
|
||||
static final String SPECIES_PREFIX_NAME = "Species_";
|
||||
static final String SPECIES_PREFIX_PATH = BMH + "$" + SPECIES_PREFIX_NAME;
|
||||
|
@ -26,20 +26,24 @@
|
||||
package java.lang.invoke;
|
||||
|
||||
import jdk.internal.misc.Unsafe;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Arrays;
|
||||
import sun.invoke.util.VerifyAccess;
|
||||
import static java.lang.invoke.MethodHandleNatives.Constants.*;
|
||||
import static java.lang.invoke.LambdaForm.*;
|
||||
import static java.lang.invoke.MethodTypeForm.*;
|
||||
import static java.lang.invoke.MethodHandleStatics.*;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.Objects;
|
||||
import jdk.internal.vm.annotation.ForceInline;
|
||||
import sun.invoke.util.ValueConversions;
|
||||
import sun.invoke.util.VerifyAccess;
|
||||
import sun.invoke.util.VerifyType;
|
||||
import sun.invoke.util.Wrapper;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Arrays;
|
||||
import java.util.Objects;
|
||||
|
||||
import static java.lang.invoke.LambdaForm.*;
|
||||
import static java.lang.invoke.MethodHandleNatives.Constants.*;
|
||||
import static java.lang.invoke.MethodHandleStatics.UNSAFE;
|
||||
import static java.lang.invoke.MethodHandleStatics.newInternalError;
|
||||
import static java.lang.invoke.MethodTypeForm.*;
|
||||
|
||||
/**
|
||||
* The flavor of method handle which implements a constant reference
|
||||
* to a class member.
|
||||
|
@ -625,9 +625,9 @@ class InvokerBytecodeGenerator {
|
||||
|
||||
if (lambdaForm.forceInline) {
|
||||
// Force inlining of this invoker method.
|
||||
mv.visitAnnotation("Ljava/lang/invoke/ForceInline;", true);
|
||||
mv.visitAnnotation("Ljdk/internal/vm/annotation/ForceInline;", true);
|
||||
} else {
|
||||
mv.visitAnnotation("Ljava/lang/invoke/DontInline;", true);
|
||||
mv.visitAnnotation("Ljdk/internal/vm/annotation/DontInline;", true);
|
||||
}
|
||||
|
||||
if (lambdaForm.customized != null) {
|
||||
@ -1309,7 +1309,7 @@ class InvokerBytecodeGenerator {
|
||||
mv.visitAnnotation("Ljava/lang/invoke/LambdaForm$Hidden;", true);
|
||||
|
||||
// Don't inline the interpreter entry.
|
||||
mv.visitAnnotation("Ljava/lang/invoke/DontInline;", true);
|
||||
mv.visitAnnotation("Ljdk/internal/vm/annotation/DontInline;", true);
|
||||
|
||||
// create parameter array
|
||||
emitIconstInsn(invokerType.parameterCount());
|
||||
@ -1368,7 +1368,7 @@ class InvokerBytecodeGenerator {
|
||||
mv.visitAnnotation("Ljava/lang/invoke/LambdaForm$Hidden;", true);
|
||||
|
||||
// Force inlining of this invoker method.
|
||||
mv.visitAnnotation("Ljava/lang/invoke/ForceInline;", true);
|
||||
mv.visitAnnotation("Ljdk/internal/vm/annotation/ForceInline;", true);
|
||||
|
||||
// Load receiver
|
||||
emitAloadInsn(0);
|
||||
|
@ -25,6 +25,10 @@
|
||||
|
||||
package java.lang.invoke;
|
||||
|
||||
import jdk.internal.vm.annotation.DontInline;
|
||||
import jdk.internal.vm.annotation.ForceInline;
|
||||
import jdk.internal.vm.annotation.Stable;
|
||||
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.Arrays;
|
||||
|
||||
|
@ -25,18 +25,24 @@
|
||||
|
||||
package java.lang.invoke;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
import jdk.internal.vm.annotation.DontInline;
|
||||
import jdk.internal.vm.annotation.Stable;
|
||||
import sun.invoke.util.Wrapper;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
|
||||
import sun.invoke.util.Wrapper;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.List;
|
||||
|
||||
import static java.lang.invoke.LambdaForm.BasicType.*;
|
||||
import static java.lang.invoke.MethodHandleStatics.*;
|
||||
import static java.lang.invoke.MethodHandleNatives.Constants.*;
|
||||
import static java.lang.invoke.MethodHandleNatives.Constants.REF_invokeStatic;
|
||||
import static java.lang.invoke.MethodHandleStatics.debugEnabled;
|
||||
import static java.lang.invoke.MethodHandleStatics.newInternalError;
|
||||
|
||||
/**
|
||||
* The symbolic, non-executable form of a method handle's invocation semantics.
|
||||
|
@ -33,6 +33,7 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
|
||||
import jdk.internal.vm.annotation.Stable;
|
||||
import sun.invoke.empty.Empty;
|
||||
import sun.invoke.util.ValueConversions;
|
||||
import sun.invoke.util.VerifyType;
|
||||
@ -1487,7 +1488,7 @@ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
|
||||
}
|
||||
|
||||
private static final int LEFT_ARGS = FILL_ARRAYS_COUNT - 1;
|
||||
private static final @Stable MethodHandle[] FILL_ARRAY_TO_RIGHT = new MethodHandle[MAX_ARITY+1];
|
||||
private static final @Stable MethodHandle[] FILL_ARRAY_TO_RIGHT = new MethodHandle[MAX_ARITY + 1];
|
||||
/** fill_array_to_right(N).invoke(a, argL..arg[N-1])
|
||||
* fills a[L]..a[N-1] with corresponding arguments,
|
||||
* and then returns a. The value L is a global constant (LEFT_ARGS).
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
package java.lang.invoke;
|
||||
|
||||
import jdk.internal.vm.annotation.Stable;
|
||||
import sun.invoke.util.Wrapper;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.lang.ref.Reference;
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
package java.lang.invoke;
|
||||
|
||||
import jdk.internal.vm.annotation.Stable;
|
||||
import sun.invoke.util.Wrapper;
|
||||
import java.lang.ref.SoftReference;
|
||||
import static java.lang.invoke.MethodHandleStatics.*;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2015, 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
|
||||
@ -29,23 +29,20 @@ package java.lang.ref;
|
||||
/**
|
||||
* Phantom reference objects, which are enqueued after the collector
|
||||
* determines that their referents may otherwise be reclaimed. Phantom
|
||||
* references are most often used for scheduling pre-mortem cleanup actions in
|
||||
* a more flexible way than is possible with the Java finalization mechanism.
|
||||
* references are most often used to schedule post-mortem cleanup actions.
|
||||
*
|
||||
* <p> If the garbage collector determines at a certain point in time that the
|
||||
* referent of a phantom reference is <a
|
||||
* href="package-summary.html#reachability">phantom reachable</a>, then at that
|
||||
* time or at some later time it will enqueue the reference.
|
||||
* <p> Suppose the garbage collector determines at a certain point in time
|
||||
* that an object is <a href="package-summary.html#reachability">
|
||||
* phantom reachable</a>. At that time it will atomically clear
|
||||
* all phantom references to that object and all phantom references to
|
||||
* any other phantom-reachable objects from which that object is reachable.
|
||||
* At the same time or at some later time it will enqueue those newly-cleared
|
||||
* phantom references that are registered with reference queues.
|
||||
*
|
||||
* <p> In order to ensure that a reclaimable object remains so, the referent of
|
||||
* a phantom reference may not be retrieved: The {@code get} method of a
|
||||
* phantom reference always returns {@code null}.
|
||||
*
|
||||
* <p> Unlike soft and weak references, phantom references are not
|
||||
* automatically cleared by the garbage collector as they are enqueued. An
|
||||
* object that is reachable via phantom references will remain so until all
|
||||
* such references are cleared or themselves become unreachable.
|
||||
*
|
||||
* @author Mark Reinhold
|
||||
* @since 1.2
|
||||
*/
|
||||
@ -69,8 +66,8 @@ public class PhantomReference<T> extends Reference<T> {
|
||||
*
|
||||
* <p> It is possible to create a phantom reference with a {@code null}
|
||||
* queue, but such a reference is completely useless: Its {@code get}
|
||||
* method will always return null and, since it does not have a queue, it
|
||||
* will never be enqueued.
|
||||
* method will always return {@code null} and, since it does not have a queue,
|
||||
* it will never be enqueued.
|
||||
*
|
||||
* @param referent the object the new phantom reference will refer to
|
||||
* @param q the queue with which the reference is to be registered,
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
package java.lang.ref;
|
||||
|
||||
import jdk.internal.vm.annotation.DontInline;
|
||||
import sun.misc.Cleaner;
|
||||
import jdk.internal.HotSpotIntrinsicCandidate;
|
||||
import jdk.internal.misc.JavaLangRefAccess;
|
||||
@ -310,4 +311,120 @@ public abstract class Reference<T> {
|
||||
this.queue = (queue == null) ? ReferenceQueue.NULL : queue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensures that the object referenced by the given reference remains
|
||||
* <a href="package-summary.html#reachability"><em>strongly reachable</em></a>,
|
||||
* regardless of any prior actions of the program that might otherwise cause
|
||||
* the object to become unreachable; thus, the referenced object is not
|
||||
* reclaimable by garbage collection at least until after the invocation of
|
||||
* this method. Invocation of this method does not itself initiate garbage
|
||||
* collection or finalization.
|
||||
*
|
||||
* <p> This method establishes an ordering for
|
||||
* <a href="package-summary.html#reachability"><em>strong reachability</em></a>
|
||||
* with respect to garbage collection. It controls relations that are
|
||||
* otherwise only implicit in a program -- the reachability conditions
|
||||
* triggering garbage collection. This method is designed for use in
|
||||
* uncommon situations of premature finalization where using
|
||||
* {@code synchronized} blocks or methods, or using other synchronization
|
||||
* facilities are not possible or do not provide the desired control. This
|
||||
* method is applicable only when reclamation may have visible effects,
|
||||
* which is possible for objects with finalizers (See
|
||||
* <a href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-12.html#jls-12.6">
|
||||
* Section 12.6 17 of <cite>The Java™ Language Specification</cite></a>)
|
||||
* that are implemented in ways that rely on ordering control for correctness.
|
||||
*
|
||||
* @apiNote
|
||||
* Finalization may occur whenever the virtual machine detects that no
|
||||
* reference to an object will ever be stored in the heap: The garbage
|
||||
* collector may reclaim an object even if the fields of that object are
|
||||
* still in use, so long as the object has otherwise become unreachable.
|
||||
* This may have surprising and undesirable effects in cases such as the
|
||||
* following example in which the bookkeeping associated with a class is
|
||||
* managed through array indices. Here, method {@code action} uses a
|
||||
* {@code reachabilityFence} to ensure that the {@code Resource} object is
|
||||
* not reclaimed before bookkeeping on an associated
|
||||
* {@code ExternalResource} has been performed; in particular here, to
|
||||
* ensure that the array slot holding the {@code ExternalResource} is not
|
||||
* nulled out in method {@link Object#finalize}, which may otherwise run
|
||||
* concurrently.
|
||||
*
|
||||
* <pre> {@code
|
||||
* class Resource {
|
||||
* private static ExternalResource[] externalResourceArray = ...
|
||||
*
|
||||
* int myIndex;
|
||||
* Resource(...) {
|
||||
* myIndex = ...
|
||||
* externalResourceArray[myIndex] = ...;
|
||||
* ...
|
||||
* }
|
||||
* protected void finalize() {
|
||||
* externalResourceArray[myIndex] = null;
|
||||
* ...
|
||||
* }
|
||||
* public void action() {
|
||||
* try {
|
||||
* // ...
|
||||
* int i = myIndex;
|
||||
* Resource.update(externalResourceArray[i]);
|
||||
* } finally {
|
||||
* Reference.reachabilityFence(this);
|
||||
* }
|
||||
* }
|
||||
* private static void update(ExternalResource ext) {
|
||||
* ext.status = ...;
|
||||
* }
|
||||
* }}</pre>
|
||||
*
|
||||
* Here, the invocation of {@code reachabilityFence} is nonintuitively
|
||||
* placed <em>after</em> the call to {@code update}, to ensure that the
|
||||
* array slot is not nulled out by {@link Object#finalize} before the
|
||||
* update, even if the call to {@code action} was the last use of this
|
||||
* object. This might be the case if, for example a usage in a user program
|
||||
* had the form {@code new Resource().action();} which retains no other
|
||||
* reference to this {@code Resource}. While probably overkill here,
|
||||
* {@code reachabilityFence} is placed in a {@code finally} block to ensure
|
||||
* that it is invoked across all paths in the method. In a method with more
|
||||
* complex control paths, you might need further precautions to ensure that
|
||||
* {@code reachabilityFence} is encountered along all of them.
|
||||
*
|
||||
* <p> It is sometimes possible to better encapsulate use of
|
||||
* {@code reachabilityFence}. Continuing the above example, if it were
|
||||
* acceptable for the call to method {@code update} to proceed even if the
|
||||
* finalizer had already executed (nulling out slot), then you could
|
||||
* localize use of {@code reachabilityFence}:
|
||||
*
|
||||
* <pre> {@code
|
||||
* public void action2() {
|
||||
* // ...
|
||||
* Resource.update(getExternalResource());
|
||||
* }
|
||||
* private ExternalResource getExternalResource() {
|
||||
* ExternalResource ext = externalResourceArray[myIndex];
|
||||
* Reference.reachabilityFence(this);
|
||||
* return ext;
|
||||
* }}</pre>
|
||||
*
|
||||
* <p> Method {@code reachabilityFence} is not required in constructions
|
||||
* that themselves ensure reachability. For example, because objects that
|
||||
* are locked cannot, in general, be reclaimed, it would suffice if all
|
||||
* accesses of the object, in all methods of class {@code Resource}
|
||||
* (including {@code finalize}) were enclosed in {@code synchronized (this)}
|
||||
* blocks. (Further, such blocks must not include infinite loops, or
|
||||
* themselves be unreachable, which fall into the corner case exceptions to
|
||||
* the "in general" disclaimer.) However, method {@code reachabilityFence}
|
||||
* remains a better option in cases where this approach is not as efficient,
|
||||
* desirable, or possible; for example because it would encounter deadlock.
|
||||
*
|
||||
* @param ref the reference. If {@code null}, this method has no effect.
|
||||
* @since 9
|
||||
*/
|
||||
@DontInline
|
||||
public static void reachabilityFence(Object ref) {
|
||||
// Does nothing, because this method is annotated with @DontInline
|
||||
// HotSpot needs to retain the ref and not GC it before a call to this
|
||||
// method
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -66,9 +66,9 @@
|
||||
* object with a <em>reference queue</em> at the time the reference
|
||||
* object is created. Some time after the garbage collector
|
||||
* determines that the reachability of the referent has changed to the
|
||||
* value corresponding to the type of the reference, it will add the
|
||||
* reference to the associated queue. At this point, the reference is
|
||||
* considered to be <em>enqueued</em>. The program may remove
|
||||
* value corresponding to the type of the reference, it will clear the
|
||||
* reference and add it to the associated queue. At this point, the
|
||||
* reference is considered to be <em>enqueued</em>. The program may remove
|
||||
* references from a queue either by polling or by blocking until a
|
||||
* reference becomes available. Reference queues are implemented by
|
||||
* the {@link java.lang.ref.ReferenceQueue} class.
|
||||
@ -94,16 +94,6 @@
|
||||
* structure, this check will add little overhead to the hashtable
|
||||
* access methods.
|
||||
*
|
||||
* <h3>Automatically-cleared references</h3>
|
||||
*
|
||||
* Soft and weak references are automatically cleared by the collector
|
||||
* before being added to the queues with which they are registered, if
|
||||
* any. Therefore soft and weak references need not be registered
|
||||
* with a queue in order to be useful, while phantom references do.
|
||||
* An object that is reachable via phantom references will remain so
|
||||
* until all such references are cleared or themselves become
|
||||
* unreachable.
|
||||
*
|
||||
* <a name="reachability"></a>
|
||||
* <h3>Reachability</h3>
|
||||
*
|
||||
|
@ -53,7 +53,7 @@ public interface AnnotatedArrayType extends AnnotatedType {
|
||||
*
|
||||
* @return {@code null}
|
||||
*
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
@Override
|
||||
AnnotatedType getAnnotatedOwnerType();
|
||||
|
@ -59,7 +59,7 @@ public interface AnnotatedParameterizedType extends AnnotatedType {
|
||||
* refers to a parameterized type that cannot be instantiated
|
||||
* for any reason
|
||||
*
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
@Override
|
||||
AnnotatedType getAnnotatedOwnerType();
|
||||
|
@ -60,7 +60,7 @@ public interface AnnotatedType extends AnnotatedElement {
|
||||
* refers to a parameterized type that cannot be instantiated
|
||||
* for any reason
|
||||
*
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
default AnnotatedType getAnnotatedOwnerType() {
|
||||
return null;
|
||||
|
@ -54,7 +54,7 @@ public interface AnnotatedTypeVariable extends AnnotatedType {
|
||||
*
|
||||
* @return {@code null}
|
||||
*
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
@Override
|
||||
AnnotatedType getAnnotatedOwnerType();
|
||||
|
@ -65,7 +65,7 @@ public interface AnnotatedWildcardType extends AnnotatedType {
|
||||
*
|
||||
* @return {@code null}
|
||||
*
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
@Override
|
||||
AnnotatedType getAnnotatedOwnerType();
|
||||
|
@ -297,7 +297,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
|
||||
* @throws IndexOutOfBoundsException if the provided array offset and
|
||||
* length would cause an index into the byte array to be
|
||||
* negative or greater than or equal to the array length.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public BigInteger(byte[] val, int off, int len) {
|
||||
if (val.length == 0) {
|
||||
@ -385,7 +385,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
|
||||
* @throws IndexOutOfBoundsException if the provided array offset and
|
||||
* length would cause an index into the byte array to be
|
||||
* negative or greater than or equal to the array length.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public BigInteger(int signum, byte[] magnitude, int off, int len) {
|
||||
if (signum < -1 || signum > 1) {
|
||||
@ -2424,7 +2424,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
|
||||
* {@code (i * sqrt(-val))} where <i>i</i> is the
|
||||
* <i>imaginary unit</i> and is equal to
|
||||
* {@code sqrt(-1)}.)
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public BigInteger sqrt() {
|
||||
if (this.signum < 0) {
|
||||
@ -2447,7 +2447,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
|
||||
* <i>imaginary unit</i> and is equal to
|
||||
* {@code sqrt(-1)}.)
|
||||
* @see #sqrt()
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public BigInteger[] sqrtAndRemainder() {
|
||||
BigInteger s = sqrt();
|
||||
|
@ -1878,7 +1878,7 @@ class MutableBigInteger {
|
||||
* @throws ArithmeticException if the value returned by {@code bitLength()}
|
||||
* overflows the range of {@code int}.
|
||||
* @return the integer square root of {@code this}
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
MutableBigInteger sqrt() {
|
||||
// Special cases.
|
||||
|
@ -1338,7 +1338,7 @@ class DatagramSocket implements java.io.Closeable {
|
||||
*
|
||||
* @throws NullPointerException if name is {@code null}
|
||||
*
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public <T> DatagramSocket setOption(SocketOption<T> name, T value)
|
||||
throws IOException
|
||||
@ -1368,7 +1368,7 @@ class DatagramSocket implements java.io.Closeable {
|
||||
* {@link java.net.StandardSocketOptions StandardSocketOptions}
|
||||
* do not require any security permission.
|
||||
*
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public <T> T getOption(SocketOption<T> name) throws IOException {
|
||||
return getImpl().getOption(name);
|
||||
@ -1386,7 +1386,7 @@ class DatagramSocket implements java.io.Closeable {
|
||||
* @return A set of the socket options supported by this socket. This set
|
||||
* may be empty if the socket's DatagramSocketImpl cannot be created.
|
||||
*
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public Set<SocketOption<?>> supportedOptions() {
|
||||
synchronized(DatagramSocket.class) {
|
||||
|
@ -278,7 +278,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
|
||||
*
|
||||
* @throws NullPointerException if name is {@code null}
|
||||
* @throws IOException if an I/O problem occurs while attempting to set the option
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
protected <T> void setOption(SocketOption<T> name, T value) throws IOException {
|
||||
if (name == StandardSocketOptions.SO_SNDBUF) {
|
||||
@ -319,7 +319,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
|
||||
* @throws NullPointerException if name is {@code null}
|
||||
* @throws IOException if an I/O problem occurs while attempting to set the option
|
||||
*
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
protected <T> T getOption(SocketOption<T> name) throws IOException {
|
||||
|
@ -130,7 +130,7 @@ public final class NetworkInterface {
|
||||
*
|
||||
* @return a Stream object with all or a subset of the InetAddresses
|
||||
* bound to this network interface
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public Stream<InetAddress> inetAddresses() {
|
||||
return streamFromArray(getCheckedInetAddresses());
|
||||
@ -208,7 +208,7 @@ public final class NetworkInterface {
|
||||
*
|
||||
* @return a Stream object with all of the subinterfaces
|
||||
* of this network interface
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public Stream<NetworkInterface> subInterfaces() {
|
||||
return streamFromArray(childs);
|
||||
@ -362,7 +362,7 @@ public final class NetworkInterface {
|
||||
*
|
||||
* @return a Stream of NetworkInterfaces found on this machine
|
||||
* @exception SocketException if an I/O error occurs.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static Stream<NetworkInterface> networkInterfaces()
|
||||
throws SocketException {
|
||||
|
@ -946,7 +946,7 @@ class ServerSocket implements java.io.Closeable {
|
||||
* {@link java.net.StandardSocketOptions StandardSocketOptions}
|
||||
* do not require any security permission.
|
||||
*
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public <T> ServerSocket setOption(SocketOption<T> name, T value)
|
||||
throws IOException
|
||||
@ -976,7 +976,7 @@ class ServerSocket implements java.io.Closeable {
|
||||
* {@link java.net.StandardSocketOptions StandardSocketOptions}
|
||||
* do not require any security permission.
|
||||
*
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public <T> T getOption(SocketOption<T> name) throws IOException {
|
||||
return getImpl().getOption(name);
|
||||
@ -994,7 +994,7 @@ class ServerSocket implements java.io.Closeable {
|
||||
* @return A set of the socket options supported by this socket. This set
|
||||
* may be empty if the socket's SocketImpl cannot be created.
|
||||
*
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public Set<SocketOption<?>> supportedOptions() {
|
||||
synchronized (ServerSocket.class) {
|
||||
|
@ -1756,7 +1756,7 @@ class Socket implements java.io.Closeable {
|
||||
* {@link java.net.StandardSocketOptions StandardSocketOptions}
|
||||
* do not require any security permission.
|
||||
*
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public <T> Socket setOption(SocketOption<T> name, T value) throws IOException {
|
||||
getImpl().setOption(name, value);
|
||||
@ -1784,7 +1784,7 @@ class Socket implements java.io.Closeable {
|
||||
* {@link java.net.StandardSocketOptions StandardSocketOptions}
|
||||
* do not require any security permission.
|
||||
*
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T getOption(SocketOption<T> name) throws IOException {
|
||||
@ -1803,7 +1803,7 @@ class Socket implements java.io.Closeable {
|
||||
* @return A set of the socket options supported by this socket. This set
|
||||
* may be empty if the socket's SocketImpl cannot be created.
|
||||
*
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public Set<SocketOption<?>> supportedOptions() {
|
||||
synchronized (Socket.class) {
|
||||
|
@ -373,7 +373,7 @@ public abstract class SocketImpl implements SocketOptions {
|
||||
*
|
||||
* @throws IOException if an I/O error occurs, or if the socket is closed.
|
||||
*
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
protected <T> void setOption(SocketOption<T> name, T value) throws IOException {
|
||||
if (name == StandardSocketOptions.SO_KEEPALIVE &&
|
||||
@ -412,7 +412,7 @@ public abstract class SocketImpl implements SocketOptions {
|
||||
*
|
||||
* @throws IOException if an I/O error occurs, or if the socket is closed.
|
||||
*
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
protected <T> T getOption(SocketOption<T> name) throws IOException {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -31,6 +31,10 @@ import java.net.spi.URLStreamHandlerProvider;
|
||||
import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
import java.util.Hashtable;
|
||||
import java.io.InvalidObjectException;
|
||||
import java.io.ObjectStreamException;
|
||||
import java.io.ObjectStreamField;
|
||||
import java.io.ObjectInputStream.GetField;
|
||||
import java.util.Iterator;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.ServiceConfigurationError;
|
||||
@ -142,6 +146,7 @@ import sun.security.util.SecurityConstants;
|
||||
*/
|
||||
public final class URL implements java.io.Serializable {
|
||||
|
||||
static final String BUILTIN_HANDLERS_PREFIX = "sun.net.www.protocol";
|
||||
static final long serialVersionUID = -7627629688361524110L;
|
||||
|
||||
/**
|
||||
@ -226,6 +231,8 @@ public final class URL implements java.io.Serializable {
|
||||
*/
|
||||
private int hashCode = -1;
|
||||
|
||||
private transient UrlDeserializedState tempState;
|
||||
|
||||
/**
|
||||
* Creates a {@code URL} object from the specified
|
||||
* {@code protocol}, {@code host}, {@code port}
|
||||
@ -1353,6 +1360,31 @@ public final class URL implements java.io.Serializable {
|
||||
return handler;
|
||||
}
|
||||
|
||||
/**
|
||||
* @serialField protocol String
|
||||
*
|
||||
* @serialField host String
|
||||
*
|
||||
* @serialField port int
|
||||
*
|
||||
* @serialField authority String
|
||||
*
|
||||
* @serialField file String
|
||||
*
|
||||
* @serialField ref String
|
||||
*
|
||||
* @serialField hashCode int
|
||||
*
|
||||
*/
|
||||
private static final ObjectStreamField[] serialPersistentFields = {
|
||||
new ObjectStreamField("protocol", String.class),
|
||||
new ObjectStreamField("host", String.class),
|
||||
new ObjectStreamField("port", int.class),
|
||||
new ObjectStreamField("authority", String.class),
|
||||
new ObjectStreamField("file", String.class),
|
||||
new ObjectStreamField("ref", String.class),
|
||||
new ObjectStreamField("hashCode", int.class), };
|
||||
|
||||
/**
|
||||
* WriteObject is called to save the state of the URL to an
|
||||
* ObjectOutputStream. The handler is not saved since it is
|
||||
@ -1375,16 +1407,67 @@ public final class URL implements java.io.Serializable {
|
||||
* stream handler.
|
||||
*/
|
||||
private synchronized void readObject(java.io.ObjectInputStream s)
|
||||
throws IOException, ClassNotFoundException
|
||||
{
|
||||
s.defaultReadObject(); // read the fields
|
||||
if ((handler = getURLStreamHandler(protocol)) == null) {
|
||||
throws IOException, ClassNotFoundException {
|
||||
GetField gf = s.readFields();
|
||||
String protocol = (String)gf.get("protocol", null);
|
||||
if (getURLStreamHandler(protocol) == null) {
|
||||
throw new IOException("unknown protocol: " + protocol);
|
||||
}
|
||||
String host = (String)gf.get("host", null);
|
||||
int port = gf.get("port", -1);
|
||||
String authority = (String)gf.get("authority", null);
|
||||
String file = (String)gf.get("file", null);
|
||||
String ref = (String)gf.get("ref", null);
|
||||
int hashCode = gf.get("hashCode", -1);
|
||||
if (authority == null
|
||||
&& ((host != null && host.length() > 0) || port != -1)) {
|
||||
if (host == null)
|
||||
host = "";
|
||||
authority = (port == -1) ? host : host + ":" + port;
|
||||
}
|
||||
tempState = new UrlDeserializedState(protocol, host, port, authority,
|
||||
file, ref, hashCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* Replaces the de-serialized object with an URL object.
|
||||
*
|
||||
* @return a newly created object from deserialized data
|
||||
*
|
||||
* @throws ObjectStreamException if a new object replacing this
|
||||
* object could not be created
|
||||
*/
|
||||
|
||||
private Object readResolve() throws ObjectStreamException {
|
||||
|
||||
URLStreamHandler handler = null;
|
||||
// already been checked in readObject
|
||||
handler = getURLStreamHandler(tempState.getProtocol());
|
||||
|
||||
URL replacementURL = null;
|
||||
if (isBuiltinStreamHandler(handler.getClass().getName())) {
|
||||
replacementURL = fabricateNewURL();
|
||||
} else {
|
||||
replacementURL = setDeserializedFields(handler);
|
||||
}
|
||||
return replacementURL;
|
||||
}
|
||||
|
||||
private URL setDeserializedFields(URLStreamHandler handler) {
|
||||
URL replacementURL;
|
||||
String userInfo = null;
|
||||
String protocol = tempState.getProtocol();
|
||||
String host = tempState.getHost();
|
||||
int port = tempState.getPort();
|
||||
String authority = tempState.getAuthority();
|
||||
String file = tempState.getFile();
|
||||
String ref = tempState.getRef();
|
||||
int hashCode = tempState.getHashCode();
|
||||
|
||||
|
||||
// Construct authority part
|
||||
if (authority == null &&
|
||||
((host != null && host.length() > 0) || port != -1)) {
|
||||
if (authority == null
|
||||
&& ((host != null && host.length() > 0) || port != -1)) {
|
||||
if (host == null)
|
||||
host = "";
|
||||
authority = (port == -1) ? host : host + ":" + port;
|
||||
@ -1403,8 +1486,8 @@ public final class URL implements java.io.Serializable {
|
||||
}
|
||||
|
||||
// Construct path and query part
|
||||
path = null;
|
||||
query = null;
|
||||
String path = null;
|
||||
String query = null;
|
||||
if (file != null) {
|
||||
// Fix: only do this if hierarchical?
|
||||
int q = file.lastIndexOf('?');
|
||||
@ -1414,6 +1497,67 @@ public final class URL implements java.io.Serializable {
|
||||
} else
|
||||
path = file;
|
||||
}
|
||||
|
||||
if (port == -1) {
|
||||
port = 0;
|
||||
}
|
||||
// Set the object fields.
|
||||
this.protocol = protocol;
|
||||
this.host = host;
|
||||
this.port = port;
|
||||
this.file = file;
|
||||
this.authority = authority;
|
||||
this.ref = ref;
|
||||
this.hashCode = hashCode;
|
||||
this.handler = handler;
|
||||
this.query = query;
|
||||
this.path = path;
|
||||
this.userInfo = userInfo;
|
||||
replacementURL = this;
|
||||
return replacementURL;
|
||||
}
|
||||
|
||||
private URL fabricateNewURL()
|
||||
throws InvalidObjectException {
|
||||
// create URL string from deserialized object
|
||||
URL replacementURL = null;
|
||||
String urlString = tempState.reconstituteUrlString();
|
||||
|
||||
try {
|
||||
replacementURL = new URL(urlString);
|
||||
} catch (MalformedURLException mEx) {
|
||||
resetState();
|
||||
InvalidObjectException invoEx = new InvalidObjectException(
|
||||
"Malformed URL: " + urlString);
|
||||
invoEx.initCause(mEx);
|
||||
throw invoEx;
|
||||
}
|
||||
replacementURL.setSerializedHashCode(tempState.getHashCode());
|
||||
resetState();
|
||||
return replacementURL;
|
||||
}
|
||||
|
||||
private boolean isBuiltinStreamHandler(String handlerClassName) {
|
||||
return (handlerClassName.startsWith(BUILTIN_HANDLERS_PREFIX));
|
||||
}
|
||||
|
||||
private void resetState() {
|
||||
this.protocol = null;
|
||||
this.host = null;
|
||||
this.port = -1;
|
||||
this.file = null;
|
||||
this.authority = null;
|
||||
this.ref = null;
|
||||
this.hashCode = -1;
|
||||
this.handler = null;
|
||||
this.query = null;
|
||||
this.path = null;
|
||||
this.userInfo = null;
|
||||
this.tempState = null;
|
||||
}
|
||||
|
||||
private void setSerializedHashCode(int hc) {
|
||||
this.hashCode = hc;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1445,3 +1589,82 @@ class Parts {
|
||||
return ref;
|
||||
}
|
||||
}
|
||||
|
||||
final class UrlDeserializedState {
|
||||
private final String protocol;
|
||||
private final String host;
|
||||
private final int port;
|
||||
private final String authority;
|
||||
private final String file;
|
||||
private final String ref;
|
||||
private final int hashCode;
|
||||
|
||||
public UrlDeserializedState(String protocol,
|
||||
String host, int port,
|
||||
String authority, String file,
|
||||
String ref, int hashCode) {
|
||||
this.protocol = protocol;
|
||||
this.host = host;
|
||||
this.port = port;
|
||||
this.authority = authority;
|
||||
this.file = file;
|
||||
this.ref = ref;
|
||||
this.hashCode = hashCode;
|
||||
}
|
||||
|
||||
String getProtocol() {
|
||||
return protocol;
|
||||
}
|
||||
|
||||
String getHost() {
|
||||
return host;
|
||||
}
|
||||
|
||||
String getAuthority () {
|
||||
return authority;
|
||||
}
|
||||
|
||||
int getPort() {
|
||||
return port;
|
||||
}
|
||||
|
||||
String getFile () {
|
||||
return file;
|
||||
}
|
||||
|
||||
String getRef () {
|
||||
return ref;
|
||||
}
|
||||
|
||||
int getHashCode () {
|
||||
return hashCode;
|
||||
}
|
||||
|
||||
String reconstituteUrlString() {
|
||||
|
||||
// pre-compute length of StringBuffer
|
||||
int len = protocol.length() + 1;
|
||||
if (authority != null && authority.length() > 0)
|
||||
len += 2 + authority.length();
|
||||
if (file != null) {
|
||||
len += file.length();
|
||||
}
|
||||
if (ref != null)
|
||||
len += 1 + ref.length();
|
||||
StringBuilder result = new StringBuilder(len);
|
||||
result.append(protocol);
|
||||
result.append(":");
|
||||
if (authority != null && authority.length() > 0) {
|
||||
result.append("//");
|
||||
result.append(authority);
|
||||
}
|
||||
if (file != null) {
|
||||
result.append(file);
|
||||
}
|
||||
if (ref != null) {
|
||||
result.append("#");
|
||||
result.append(ref);
|
||||
}
|
||||
return result.toString();
|
||||
}
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ import java.net.URLStreamHandlerFactory;
|
||||
* <p> URL stream handler providers are located at runtime, as specified in the
|
||||
* {@linkplain java.net.URL#URL(String,String,int,String) URL constructor}.
|
||||
*
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public abstract class URLStreamHandlerProvider
|
||||
implements URLStreamHandlerFactory
|
||||
|
@ -29,7 +29,7 @@
|
||||
* <p> Only developers who are defining new URL stream handler providers
|
||||
* should need to make direct use of this package.
|
||||
*
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
|
||||
package java.net.spi;
|
||||
|
@ -213,7 +213,7 @@ public abstract class MappedByteBuffer
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
@Override
|
||||
public final MappedByteBuffer position(int newPosition) {
|
||||
@ -223,7 +223,7 @@ public abstract class MappedByteBuffer
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
@Override
|
||||
public final MappedByteBuffer limit(int newLimit) {
|
||||
@ -233,7 +233,7 @@ public abstract class MappedByteBuffer
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
@Override
|
||||
public final MappedByteBuffer mark() {
|
||||
@ -243,7 +243,7 @@ public abstract class MappedByteBuffer
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
@Override
|
||||
public final MappedByteBuffer reset() {
|
||||
@ -253,7 +253,7 @@ public abstract class MappedByteBuffer
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
@Override
|
||||
public final MappedByteBuffer clear() {
|
||||
@ -263,7 +263,7 @@ public abstract class MappedByteBuffer
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
@Override
|
||||
public final MappedByteBuffer flip() {
|
||||
@ -273,7 +273,7 @@ public abstract class MappedByteBuffer
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
@Override
|
||||
public final MappedByteBuffer rewind() {
|
||||
|
@ -1064,7 +1064,7 @@ public abstract class $Type$Buffer
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
@Override
|
||||
public
|
||||
@ -1078,7 +1078,7 @@ public abstract class $Type$Buffer
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
@Override
|
||||
public
|
||||
@ -1092,7 +1092,7 @@ public abstract class $Type$Buffer
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
@Override
|
||||
public
|
||||
@ -1106,7 +1106,7 @@ public abstract class $Type$Buffer
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
@Override
|
||||
public
|
||||
@ -1120,7 +1120,7 @@ public abstract class $Type$Buffer
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
@Override
|
||||
public
|
||||
@ -1134,7 +1134,7 @@ public abstract class $Type$Buffer
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
@Override
|
||||
public
|
||||
@ -1148,7 +1148,7 @@ public abstract class $Type$Buffer
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
@Override
|
||||
public
|
||||
|
@ -1666,7 +1666,7 @@ public class KeyStore {
|
||||
*
|
||||
* @see Provider
|
||||
*
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final KeyStore getInstance(File file, char[] password)
|
||||
throws KeyStoreException, IOException, NoSuchAlgorithmException,
|
||||
@ -1722,7 +1722,7 @@ public class KeyStore {
|
||||
*
|
||||
* @see Provider
|
||||
*
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static final KeyStore getInstance(File file,
|
||||
LoadStoreParameter param) throws KeyStoreException, IOException,
|
||||
@ -2006,7 +2006,7 @@ public class KeyStore {
|
||||
* of either PasswordProtection or CallbackHandlerProtection; or
|
||||
* if file does not exist or does not refer to a normal file
|
||||
*
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public static Builder newInstance(File file,
|
||||
ProtectionParameter protection) {
|
||||
|
@ -144,7 +144,7 @@ public abstract class PermissionCollection implements java.io.Serializable {
|
||||
* the enumeration returned from a call to {@link #elements()}.
|
||||
*
|
||||
* @return a stream of all the Permissions.
|
||||
* @since 1.9
|
||||
* @since 9
|
||||
*/
|
||||
public Stream<Permission> elementsAsStream() {
|
||||
int characteristics = isReadOnly()
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user