mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-10 23:18:45 +00:00
Merge
This commit is contained in:
commit
a6b92a1d83
1
.hgtags
1
.hgtags
@ -150,3 +150,4 @@ e8f03541af27e38aafb619b96863e17f65ffe53b jdk8-b22
|
||||
6c805d8ed4e5449ea5e4d158c7bdbd7b0b70efd1 jdk8-b26
|
||||
c51754cddc037b9609e202b9ed38363d8683e7a8 jdk8-b27
|
||||
16ba58282d117247f480aae7a79b88141ade52a3 jdk8-b28
|
||||
e070119aa56ee4dc5506c19d2c4d2eecab8ad429 jdk8-b29
|
||||
|
||||
@ -150,3 +150,4 @@ cc771d92284f71765eca14d6d08703c4af254c04 jdk8-b21
|
||||
2accafff224ae39caf5f532c305251ba624bf2c0 jdk8-b26
|
||||
1533dfab9903e4edcfead3b0192643f38c418b9b jdk8-b27
|
||||
6e2541d60f4e342b5b67140271d7611643929dc3 jdk8-b28
|
||||
41460de042580bc4a4ce3f863779c66f39cb8578 jdk8-b29
|
||||
|
||||
@ -2,3 +2,4 @@
|
||||
^dist/
|
||||
/nbproject/private/
|
||||
^.hgtip
|
||||
.DS_Store
|
||||
|
||||
@ -150,3 +150,4 @@ e45d6b406d5f91ff5256a5c82456ab1e7eb8becd jdk8-b25
|
||||
79f709a099f40c08f76567fa6d813f9009a69826 jdk8-b26
|
||||
4fffe75e4edd39a2517f10b743941bf94edb143d jdk8-b27
|
||||
2082eb35d49a9c2aab90b8d4fd31cefb7a23b82e jdk8-b28
|
||||
6117395d422682f89d228347e319fcaac7edc729 jdk8-b29
|
||||
|
||||
46
corba/make/common/Defs-bsd.gmk
Normal file
46
corba/make/common/Defs-bsd.gmk
Normal file
@ -0,0 +1,46 @@
|
||||
#
|
||||
# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. 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.
|
||||
#
|
||||
|
||||
#
|
||||
# Makefile to specify compiler flags for programs and libraries
|
||||
# targeted to BSD. Should not contain any rules.
|
||||
#
|
||||
|
||||
# Warning: the following variables are overriden by Defs.gmk. Set
|
||||
# values will be silently ignored:
|
||||
# CFLAGS (set $(OTHER_CFLAGS) instead)
|
||||
# CPPFLAGS (set $(OTHER_CPPFLAGS) instead)
|
||||
# CXXFLAGS (set $(OTHER_CXXFLAGS) instead)
|
||||
# LDFLAGS (set $(OTHER_LDFAGS) instead)
|
||||
# LDLIBS (set $(EXTRA_LIBS) instead)
|
||||
# LDLIBS_COMMON (set $(EXTRA_LIBS) instead)
|
||||
|
||||
# Get shared JDK settings
|
||||
include $(BUILDDIR)/common/shared/Defs.gmk
|
||||
|
||||
ifndef PLATFORM_SRC
|
||||
PLATFORM_SRC = $(TOPDIR)/src/solaris
|
||||
endif # PLATFORM_SRC
|
||||
|
||||
131
corba/make/common/shared/Defs-bsd.gmk
Normal file
131
corba/make/common/shared/Defs-bsd.gmk
Normal file
@ -0,0 +1,131 @@
|
||||
#
|
||||
# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. 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.
|
||||
#
|
||||
|
||||
#
|
||||
# Definitions for Bsd.
|
||||
#
|
||||
|
||||
# Default for COMPILER_WARNINGS_FATAL on Bsd (C & C++ compiler warnings)
|
||||
ifndef COMPILER_WARNINGS_FATAL
|
||||
COMPILER_WARNINGS_FATAL=false
|
||||
endif
|
||||
|
||||
# Bsd should use parallel compilation for best build times
|
||||
ifndef COMPILE_APPROACH
|
||||
COMPILE_APPROACH = parallel
|
||||
endif
|
||||
|
||||
# Indication that we are doing an incremental build.
|
||||
# This may trigger the creation of make depend files.
|
||||
ifndef INCREMENTAL_BUILD
|
||||
INCREMENTAL_BUILD = false
|
||||
endif
|
||||
|
||||
# FullPath just makes sure it never ends with a / and no duplicates
|
||||
define FullPath
|
||||
$(shell cd $1 2> $(DEV_NULL) && pwd)
|
||||
endef
|
||||
|
||||
# OptFullPath: Absolute path name of a dir that might not initially exist.
|
||||
define OptFullPath
|
||||
$(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && pwd); else echo "$1"; fi)
|
||||
endef
|
||||
|
||||
# Location on system where jdk installs might be
|
||||
USRJDKINSTANCES_PATH =$(PACKAGE_PATH)
|
||||
|
||||
# UNIXCOMMAND_PATH: path to where the most common Unix commands are.
|
||||
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
|
||||
ifneq "$(origin ALT_UNIXCOMMAND_PATH)" "undefined"
|
||||
UNIXCOMMAND_PATH :=$(call PrefixPath,$(ALT_UNIXCOMMAND_PATH))
|
||||
else
|
||||
UNIXCOMMAND_PATH = /bin/
|
||||
endif
|
||||
|
||||
# USRBIN_PATH: path to where the most common Unix commands are.
|
||||
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
|
||||
ifneq "$(origin ALT_USRBIN_PATH)" "undefined"
|
||||
USRBIN_PATH :=$(call PrefixPath,$(ALT_USRBIN_PATH))
|
||||
else
|
||||
USRBIN_PATH = /usr/bin/
|
||||
endif
|
||||
|
||||
# UNIXCCS_PATH: path to where the Solaris ported UNIX commands can be found
|
||||
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
|
||||
ifneq "$(origin ALT_UNIXCCS_PATH)" "undefined"
|
||||
UNIXCCS_PATH :=$(call PrefixPath,$(ALT_UNIXCCS_PATH))
|
||||
else
|
||||
UNIXCCS_PATH = /usr/ccs/bin/
|
||||
endif
|
||||
|
||||
# SLASH_JAVA: location of all network accessable files
|
||||
ifdef ALT_SLASH_JAVA
|
||||
SLASH_JAVA :=$(ALT_SLASH_JAVA)
|
||||
else
|
||||
SLASH_JAVA := $(call DirExists,/java,/java,/NOT-SET)
|
||||
endif
|
||||
|
||||
# JDK_DEVTOOLS_DIR: common path for all the java devtools
|
||||
ifdef ALT_JDK_DEVTOOLS_DIR
|
||||
JDK_DEVTOOLS_DIR =$(ALT_JDK_DEVTOOLS_DIR)
|
||||
else
|
||||
JDK_DEVTOOLS_DIR =$(SLASH_JAVA)/devtools
|
||||
endif
|
||||
|
||||
# DEVTOOLS_PATH: for other tools required for building (such as zip, etc.)
|
||||
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
|
||||
ifneq "$(origin ALT_DEVTOOLS_PATH)" "undefined"
|
||||
DEVTOOLS_PATH :=$(call PrefixPath,$(ALT_DEVTOOLS_PATH))
|
||||
else
|
||||
DEVTOOLS_PATH =$(PACKAGE_PATH)/bin/
|
||||
endif
|
||||
|
||||
# _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK.
|
||||
# _BOOTDIR2: Second choice
|
||||
ifndef ALT_BOOTDIR
|
||||
_BOOTDIR1 =$(SLASH_JAVA)/re/jdk/$(PREVIOUS_JDK_VERSION)/archive/fcs/binaries/$(PLATFORM)-$(ARCH)
|
||||
_BOOTDIR2 =$(USRJDKINSTANCES_PATH)/jdk$(PREVIOUS_JDK_VERSION)
|
||||
endif
|
||||
|
||||
# Import JDK images allow for partial builds, components not built are
|
||||
# imported (or copied from) these import areas when needed.
|
||||
|
||||
# BUILD_JDK_IMPORT_PATH: location of JDK install trees to import for
|
||||
# multiple platforms, e.g. windows-i586, solaris-sparc, bsd-586, etc.
|
||||
ifdef ALT_BUILD_JDK_IMPORT_PATH
|
||||
BUILD_JDK_IMPORT_PATH :=$(call FullPath,$(ALT_BUILD_JDK_IMPORT_PATH))
|
||||
else
|
||||
BUILD_JDK_IMPORT_PATH = $(PROMOTED_BUILD_BINARIES)
|
||||
endif
|
||||
BUILD_JDK_IMPORT_PATH:=$(call AltCheckValue,BUILD_JDK_IMPORT_PATH)
|
||||
|
||||
# JDK_IMPORT_PATH: location of JDK install tree (this version) to import
|
||||
ifdef ALT_JDK_IMPORT_PATH
|
||||
JDK_IMPORT_PATH :=$(call FullPath,$(ALT_JDK_IMPORT_PATH))
|
||||
else
|
||||
JDK_IMPORT_PATH = $(BUILD_JDK_IMPORT_PATH)/$(PLATFORM)-$(ARCH)$(_JDK_IMPORT_VARIANT)
|
||||
endif
|
||||
JDK_IMPORT_PATH:=$(call AltCheckValue,JDK_IMPORT_PATH)
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
# These input UTILS_* variables can be defined at anytime, ideally once.
|
||||
# Unix Commands: Normally /bin/, /usr/bin/. or C:/mksnt/mksnt/
|
||||
# UTILS_COMMAND_PATH
|
||||
# /usr/bin/
|
||||
# /usr/bin/
|
||||
# UTILS_USR_BIN_PATH
|
||||
# /usr/ccs/bin/ (sccs, m4, lex, yacc, as, ar, strip, mcs)
|
||||
# UTILS_CCS_BIN_PATH
|
||||
@ -53,6 +53,13 @@ ifeq ($(PLATFORM),linux)
|
||||
UTILS_DEVTOOL_PATH=$(USRBIN_PATH)
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),bsd)
|
||||
UTILS_COMMAND_PATH=$(UNIXCOMMAND_PATH)
|
||||
UTILS_USR_BIN_PATH=$(USRBIN_PATH)
|
||||
UTILS_CCS_BIN_PATH=$(USRBIN_PATH)
|
||||
UTILS_DEVTOOL_PATH=$(DEVTOOLS_PATH)
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),solaris)
|
||||
UTILS_COMMAND_PATH=$(UNIXCOMMAND_PATH)
|
||||
UTILS_USR_BIN_PATH=$(UNIXCOMMAND_PATH)
|
||||
@ -166,15 +173,15 @@ ifeq ($(PLATFORM),linux)
|
||||
# Also, some distribution (Ubuntu, Debian, others?) place the rpm command
|
||||
# itself in /usr/bin rather than it's traditional home in /bin.
|
||||
RPM=$(firstword $(wildcard $(UTILS_COMMAND_PATH)rpm) \
|
||||
$(wildcard $(UTILS_USR_BIN_PATH)rpm))
|
||||
$(wildcard $(UTILS_USR_BIN_PATH)rpm))
|
||||
RPMBUILD=$(firstword $(wildcard $(UTILS_COMMAND_PATH)rpmbuild) \
|
||||
$(wildcard $(UTILS_USR_BIN_PATH)rpmbuild) \
|
||||
$(wildcard $(UTILS_COMMAND_PATH)rpm) \
|
||||
$(wildcard $(UTILS_USR_BIN_PATH)rpm))
|
||||
$(wildcard $(UTILS_USR_BIN_PATH)rpmbuild) \
|
||||
$(wildcard $(UTILS_COMMAND_PATH)rpm) \
|
||||
$(wildcard $(UTILS_USR_BIN_PATH)rpm))
|
||||
# Most Linux distros have "sort" in /bin. Ubuntu, Debian and perhaps
|
||||
# others have it in /usr/bin.
|
||||
SORT=$(firstword $(wildcard $(UTILS_COMMAND_PATH)sort) \
|
||||
$(wildcard $(UTILS_USR_BIN_PATH)sort))
|
||||
$(wildcard $(UTILS_USR_BIN_PATH)sort))
|
||||
NAWK = $(USRBIN_PATH)gawk
|
||||
# Intrinsic unix command, with backslash-escaped character interpretation
|
||||
ECHO = /bin/echo -e
|
||||
@ -198,3 +205,34 @@ ifeq ($(PLATFORM),solaris)
|
||||
ECHO = /usr/bin/echo
|
||||
endif
|
||||
|
||||
# BSD specific
|
||||
ifeq ($(PLATFORM),bsd)
|
||||
BASENAME = $(UTILS_USR_BIN_PATH)basename
|
||||
EGREP = $(UTILS_USR_BIN_PATH)egrep
|
||||
EXPR = $(UTILS_COMMAND_PATH)expr
|
||||
FMT = $(UTILS_USR_BIN_PATH)fmt
|
||||
GREP = $(UTILS_USR_BIN_PATH)grep
|
||||
GUNZIP = $(UTILS_USR_BIN_PATH)gunzip
|
||||
ID = $(UTILS_USR_BIN_PATH)id
|
||||
MSGFMT = $(UTILS_DEVTOOL_PATH)msgfmt
|
||||
SED = $(UTILS_USR_BIN_PATH)sed
|
||||
SORT = $(UTILS_USR_BIN_PATH)sort
|
||||
TEST = $(UTILS_COMMAND_PATH)test
|
||||
TOUCH = $(UTILS_USR_BIN_PATH)touch
|
||||
TRUE = $(UTILS_USR_BIN_PATH)true
|
||||
UNAME = $(UTILS_USR_BIN_PATH)uname
|
||||
# BSD OS_VENDOR specific
|
||||
ifeq ($(OS_VENDOR), Apple)
|
||||
NAWK = $(UTILS_USR_BIN_PATH)awk
|
||||
UNZIPSFX = $(UTILS_USR_BIN_PATH)unzipsfx
|
||||
ZIPEXE = $(UTILS_USR_BIN_PATH)zip
|
||||
else
|
||||
UNZIP = $(UTILS_DEVTOOL_PATH)unzip
|
||||
endif
|
||||
ifeq ($(OS_VENDOR), OpenBSD)
|
||||
NAWK = $(UTILS_USR_BIN_PATH)awk
|
||||
else
|
||||
CPIO = $(UTILS_USR_BIN_PATH)cpio
|
||||
TAR = $(UTILS_USR_BIN_PATH)tar
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -62,8 +62,8 @@ PLATFORM_SHARED=done
|
||||
# CLASSPATH_SEPARATOR separator in classpath, ; or :
|
||||
# BUNDLE_FILE_SUFFIX suffix for bundles: .tar or .tar.gz
|
||||
# ISA_DIR solaris only: /sparcv9 or /amd64
|
||||
# REQUIRED_WINDOWS_NAME windows only: basic name of windows
|
||||
# REQUIRED_WINDOWS_VERSION windows only: specific version of windows
|
||||
# REQUIRED_WINDOWS_NAME windows only: basic name of windows
|
||||
# REQUIRED_WINDOWS_VERSION windows only: specific version of windows
|
||||
# USING_CYGWIN windows only: true or false
|
||||
# WINDOWS_NT_VERSION_STRING windows only: long version name
|
||||
# REQUIRED_OS_VERSION required OS version, e.g. 5.10, 2.4
|
||||
@ -135,7 +135,7 @@ ifeq ($(SYSTEM_UNAME), SunOS)
|
||||
BUNDLE_FILE_SUFFIX=.tar
|
||||
# Required Solaris version
|
||||
REQUIRED_OS_VERSION = 5.10
|
||||
# Minimum disk space needed as determined by running 'du -sk' on
|
||||
# Minimum disk space needed as determined by running 'du -sk' on
|
||||
# a fully built workspace.
|
||||
ifeq ($(ARCH_FAMILY), sparc)
|
||||
REQUIRED_FREE_SPACE=1300000
|
||||
@ -207,7 +207,7 @@ ifeq ($(SYSTEM_UNAME), Linux)
|
||||
|
||||
# Suffix for file bundles used in previous release
|
||||
BUNDLE_FILE_SUFFIX=.tar.gz
|
||||
# Minimum disk space needed as determined by running 'du -sk' on
|
||||
# Minimum disk space needed as determined by running 'du -sk' on
|
||||
# a fully built workspace.
|
||||
REQUIRED_FREE_SPACE=1460000
|
||||
LINUX_VERSION_INFO = /etc/redhat-release
|
||||
@ -231,6 +231,98 @@ ifeq ($(SYSTEM_UNAME), Linux)
|
||||
MB_OF_MEMORY := $(shell free -m | fgrep Mem: | sed -e 's@\ \ *@ @g' | cut -d' ' -f2)
|
||||
endif
|
||||
|
||||
ifeq ($(SYSTEM_UNAME), FreeBSD)
|
||||
PLATFORM = bsd
|
||||
OS_NAME = freebsd
|
||||
OS_VENDOR = FreeBSD
|
||||
REQUIRED_OS_VERSION = 6.0
|
||||
endif
|
||||
|
||||
ifeq ($(SYSTEM_UNAME), Darwin)
|
||||
PLATFORM = bsd
|
||||
OS_NAME = darwin
|
||||
OS_VENDOR = Apple
|
||||
REQUIRED_OS_VERSION = 8.0
|
||||
endif
|
||||
|
||||
ifeq ($(SYSTEM_UNAME), NetBSD)
|
||||
PLATFORM = bsd
|
||||
OS_NAME = netbsd
|
||||
OS_VENDOR = NetBSD
|
||||
REQUIRED_OS_VERSION = 3.0
|
||||
endif
|
||||
|
||||
ifeq ($(SYSTEM_UNAME), OpenBSD)
|
||||
PLATFORM = bsd
|
||||
OS_NAME = openbsd
|
||||
OS_VENDOR = OpenBSD
|
||||
REQUIRED_OS_VERSION = 4.9
|
||||
endif
|
||||
|
||||
# Platform settings specific to BSD
|
||||
ifeq ($(PLATFORM), bsd)
|
||||
OS_VERSION := $(shell uname -r)
|
||||
# Arch and OS name/version
|
||||
mach := $(shell uname -m)
|
||||
archExpr = case "$(mach)" in \
|
||||
i[3-9]86) \
|
||||
echo i586 \
|
||||
;; \
|
||||
sparc64) \
|
||||
echo sparcv9 \
|
||||
;; \
|
||||
sparc*) \
|
||||
echo sparc \
|
||||
;; \
|
||||
x86_64) \
|
||||
echo amd64 \
|
||||
;; \
|
||||
"Power Macintosh") \
|
||||
echo ppc \
|
||||
;; \
|
||||
*) \
|
||||
echo $(mach) \
|
||||
;; \
|
||||
esac
|
||||
ARCH := $(shell $(archExpr) )
|
||||
ARCH_FAMILY := $(ARCH)
|
||||
|
||||
# Darwin x86 builds are i386/amd64 universal.
|
||||
ifeq ($(SYSTEM_UNAME), Darwin)
|
||||
ifneq ($(ARCH), ppc)
|
||||
ARCH=universal
|
||||
endif
|
||||
endif
|
||||
|
||||
# i586, sparc, and ppc are 32 bit, amd64 and sparc64 are 64
|
||||
ifneq (,$(findstring $(ARCH), i586 sparc ppc universal))
|
||||
ARCH_DATA_MODEL=32
|
||||
else
|
||||
ARCH_DATA_MODEL=64
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH), i586)
|
||||
LIBARCH = i386
|
||||
else
|
||||
LIBARCH = $(ARCH)
|
||||
endif
|
||||
|
||||
# Value of Java os.arch property
|
||||
ARCHPROP = $(LIBARCH)
|
||||
|
||||
# Suffix for file bundles used in previous release
|
||||
BUNDLE_FILE_SUFFIX=.tar.gz
|
||||
# Minimum disk space needed as determined by running 'du -sk' on
|
||||
# a fully built workspace.
|
||||
REQUIRED_FREE_SPACE=1500000
|
||||
# How much RAM does this machine have:
|
||||
ifeq ($(OS_VENDOR), OpenBSD)
|
||||
MB_OF_MEMORY=$(shell sysctl -n hw.physmem | awk '{print int($$NF / 1048576); }' )
|
||||
else
|
||||
MB_OF_MEMORY=$(shell (sysctl -n hw.physmem64 2> /dev/null || sysctl -n hw.physmem) | awk '{print int($$NF / 1048576); }' )
|
||||
endif
|
||||
endif
|
||||
|
||||
# Windows with and without CYGWIN will be slightly different
|
||||
ifeq ($(SYSTEM_UNAME), Windows_NT)
|
||||
PLATFORM = windows
|
||||
@ -327,7 +419,7 @@ ifeq ($(PLATFORM), windows)
|
||||
endif
|
||||
# Suffix for file bundles used in previous release
|
||||
BUNDLE_FILE_SUFFIX=.tar
|
||||
# Minimum disk space needed as determined by running 'du -sk' on
|
||||
# Minimum disk space needed as determined by running 'du -sk' on
|
||||
# a fully built workspace.
|
||||
REQUIRED_FREE_SPACE=500000
|
||||
# How much RAM does this machine have:
|
||||
@ -335,8 +427,8 @@ ifeq ($(PLATFORM), windows)
|
||||
MB_OF_MEMORY := $(shell \
|
||||
if [ -f "C:/cygwin/bin/free.exe" ] ; then \
|
||||
( C:/cygwin/bin/bash.exe -c "C:/cygwin/bin/free.exe -m" ) | \
|
||||
grep Mem: | \
|
||||
sed -e 's@\ \ *@ @g' | cut -d' ' -f2 ; \
|
||||
grep Mem: | \
|
||||
sed -e 's@\ \ *@ @g' | cut -d' ' -f2 ; \
|
||||
else \
|
||||
echo "512"; \
|
||||
fi)
|
||||
@ -392,7 +484,7 @@ ifneq ($(PLATFORM), windows)
|
||||
# Where is unwanted output to be delivered?
|
||||
DEV_NULL = /dev/null
|
||||
export DEV_NULL
|
||||
# Character used between entries in classpath
|
||||
# Character used between entries in classpath
|
||||
CLASSPATH_SEPARATOR = :
|
||||
# User name determination (set _USER)
|
||||
ifndef USER
|
||||
|
||||
@ -228,3 +228,4 @@ f92a171cf0071ca6c3fa8231d7d570377f8b2f4d hs23-b16
|
||||
975c4105f1e2ef1190a75b77124033f1fd4290b5 hs24-b01
|
||||
b183b0863611b85dbac16f3b08b40ba978756d19 jdk8-b28
|
||||
030b5306d60f140e822e4a6d301744cb110ff0c8 hs24-b02
|
||||
b45b5c564098c58ea69e7cff3f7d341f0254dd1d jdk8-b29
|
||||
|
||||
@ -150,3 +150,4 @@ bb694c151fc7b5c8f9edc8af6a80738530feacaf jdk8-b25
|
||||
dbb7283c197b27da1fc12ae8a83785c851b68c12 jdk8-b26
|
||||
80c47eb83d24fdd64bbb48f288bd6d4f03e0ec88 jdk8-b27
|
||||
f3244c1f04864d35c41fa8d13669faf4f65b81e2 jdk8-b28
|
||||
25099a745e1a43579b6af86b3e052b2e50958753 jdk8-b29
|
||||
|
||||
@ -5,3 +5,4 @@
|
||||
^webrev/
|
||||
/nbproject/private/
|
||||
^.hgtip
|
||||
.DS_Store
|
||||
|
||||
@ -150,3 +150,4 @@ b376d901e006cd9e0c59733c84e190aace23eec6 jdk8-b25
|
||||
3518639eab6ce5c7b482bdb0a60342c392ab97a8 jdk8-b26
|
||||
38c037af4127289de12efc67f45d19bb67abff69 jdk8-b27
|
||||
88b85470e72ce48515c802d2158f61cad198b935 jdk8-b28
|
||||
4897d9d2d04838e3479745efa238a99bacd939c9 jdk8-b29
|
||||
|
||||
@ -39,6 +39,7 @@ jprt.build.targets= \
|
||||
solaris_x64_5.10-{product|fastdebug}, \
|
||||
linux_i586_2.6-{product|fastdebug}, \
|
||||
linux_x64_2.6-{product|fastdebug}, \
|
||||
macosx_x64_10.7-{product|fastdebug}, \
|
||||
windows_i586_5.1-{product|fastdebug}, \
|
||||
windows_x64_5.2-{product|fastdebug}
|
||||
|
||||
|
||||
@ -1,41 +1,26 @@
|
||||
/*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright (c) 1997-2011 Oracle and/or its affiliates. All rights reserved.
|
||||
* 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.
|
||||
*
|
||||
* The contents of this file are subject to the terms of either the GNU
|
||||
* General Public License Version 2 only ("GPL") or the Common Development
|
||||
* and Distribution License("CDDL") (collectively, the "License"). You
|
||||
* may not use this file except in compliance with the License. You can
|
||||
* obtain a copy of the License at
|
||||
* https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
|
||||
* or packager/legal/LICENSE.txt. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
* 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).
|
||||
*
|
||||
* When distributing the software, include this License Header Notice in each
|
||||
* file and include the License file at packager/legal/LICENSE.txt.
|
||||
* 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.
|
||||
*
|
||||
* GPL Classpath Exception:
|
||||
* Oracle designates this particular file as subject to the "Classpath"
|
||||
* exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
* file that accompanied this code.
|
||||
*
|
||||
* Modifications:
|
||||
* If applicable, add the following below the License Header, with the fields
|
||||
* enclosed by brackets [] replaced by your own identifying information:
|
||||
* "Portions Copyright [year] [name of copyright owner]"
|
||||
*
|
||||
* Contributor(s):
|
||||
* If you wish your version of this file to be governed by only the CDDL or
|
||||
* only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
* elects to include this software in this distribution under the [CDDL or GPL
|
||||
* Version 2] license." If you don't indicate a single choice of license, a
|
||||
* recipient has the option to distribute your version of this file under
|
||||
* either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
* its licensees as provided above. However, if you add GPL Version 2 code
|
||||
* and therefore, elected the GPL Version 2 license, then the option applies
|
||||
* only if the new code is made subject to such option by the copyright
|
||||
* holder.
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.org.jvnet.ws;
|
||||
|
||||
@ -1,41 +1,26 @@
|
||||
/*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright (c) 1997-2011 Oracle and/or its affiliates. All rights reserved.
|
||||
* 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.
|
||||
*
|
||||
* The contents of this file are subject to the terms of either the GNU
|
||||
* General Public License Version 2 only ("GPL") or the Common Development
|
||||
* and Distribution License("CDDL") (collectively, the "License"). You
|
||||
* may not use this file except in compliance with the License. You can
|
||||
* obtain a copy of the License at
|
||||
* https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
|
||||
* or packager/legal/LICENSE.txt. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
* 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).
|
||||
*
|
||||
* When distributing the software, include this License Header Notice in each
|
||||
* file and include the License file at packager/legal/LICENSE.txt.
|
||||
* 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.
|
||||
*
|
||||
* GPL Classpath Exception:
|
||||
* Oracle designates this particular file as subject to the "Classpath"
|
||||
* exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
* file that accompanied this code.
|
||||
*
|
||||
* Modifications:
|
||||
* If applicable, add the following below the License Header, with the fields
|
||||
* enclosed by brackets [] replaced by your own identifying information:
|
||||
* "Portions Copyright [year] [name of copyright owner]"
|
||||
*
|
||||
* Contributor(s):
|
||||
* If you wish your version of this file to be governed by only the CDDL or
|
||||
* only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
* elects to include this software in this distribution under the [CDDL or GPL
|
||||
* Version 2] license." If you don't indicate a single choice of license, a
|
||||
* recipient has the option to distribute your version of this file under
|
||||
* either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
* its licensees as provided above. However, if you add GPL Version 2 code
|
||||
* and therefore, elected the GPL Version 2 license, then the option applies
|
||||
* only if the new code is made subject to such option by the copyright
|
||||
* holder.
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.org.jvnet.ws;
|
||||
|
||||
@ -1,41 +1,26 @@
|
||||
/*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright (c) 1997-2011 Oracle and/or its affiliates. All rights reserved.
|
||||
* 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.
|
||||
*
|
||||
* The contents of this file are subject to the terms of either the GNU
|
||||
* General Public License Version 2 only ("GPL") or the Common Development
|
||||
* and Distribution License("CDDL") (collectively, the "License"). You
|
||||
* may not use this file except in compliance with the License. You can
|
||||
* obtain a copy of the License at
|
||||
* https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
|
||||
* or packager/legal/LICENSE.txt. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
* 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).
|
||||
*
|
||||
* When distributing the software, include this License Header Notice in each
|
||||
* file and include the License file at packager/legal/LICENSE.txt.
|
||||
* 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.
|
||||
*
|
||||
* GPL Classpath Exception:
|
||||
* Oracle designates this particular file as subject to the "Classpath"
|
||||
* exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
* file that accompanied this code.
|
||||
*
|
||||
* Modifications:
|
||||
* If applicable, add the following below the License Header, with the fields
|
||||
* enclosed by brackets [] replaced by your own identifying information:
|
||||
* "Portions Copyright [year] [name of copyright owner]"
|
||||
*
|
||||
* Contributor(s):
|
||||
* If you wish your version of this file to be governed by only the CDDL or
|
||||
* only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
* elects to include this software in this distribution under the [CDDL or GPL
|
||||
* Version 2] license." If you don't indicate a single choice of license, a
|
||||
* recipient has the option to distribute your version of this file under
|
||||
* either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
* its licensees as provided above. However, if you add GPL Version 2 code
|
||||
* and therefore, elected the GPL Version 2 license, then the option applies
|
||||
* only if the new code is made subject to such option by the copyright
|
||||
* holder.
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.org.jvnet.ws.databinding;
|
||||
|
||||
@ -1,41 +1,26 @@
|
||||
/*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright (c) 1997-2011 Oracle and/or its affiliates. All rights reserved.
|
||||
* 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.
|
||||
*
|
||||
* The contents of this file are subject to the terms of either the GNU
|
||||
* General Public License Version 2 only ("GPL") or the Common Development
|
||||
* and Distribution License("CDDL") (collectively, the "License"). You
|
||||
* may not use this file except in compliance with the License. You can
|
||||
* obtain a copy of the License at
|
||||
* https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
|
||||
* or packager/legal/LICENSE.txt. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
* 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).
|
||||
*
|
||||
* When distributing the software, include this License Header Notice in each
|
||||
* file and include the License file at packager/legal/LICENSE.txt.
|
||||
* 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.
|
||||
*
|
||||
* GPL Classpath Exception:
|
||||
* Oracle designates this particular file as subject to the "Classpath"
|
||||
* exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
* file that accompanied this code.
|
||||
*
|
||||
* Modifications:
|
||||
* If applicable, add the following below the License Header, with the fields
|
||||
* enclosed by brackets [] replaced by your own identifying information:
|
||||
* "Portions Copyright [year] [name of copyright owner]"
|
||||
*
|
||||
* Contributor(s):
|
||||
* If you wish your version of this file to be governed by only the CDDL or
|
||||
* only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
* elects to include this software in this distribution under the [CDDL or GPL
|
||||
* Version 2] license." If you don't indicate a single choice of license, a
|
||||
* recipient has the option to distribute your version of this file under
|
||||
* either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
* its licensees as provided above. However, if you add GPL Version 2 code
|
||||
* and therefore, elected the GPL Version 2 license, then the option applies
|
||||
* only if the new code is made subject to such option by the copyright
|
||||
* holder.
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.org.jvnet.ws.databinding;
|
||||
|
||||
@ -1,42 +1,28 @@
|
||||
/*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright (c) 1997-2011 Oracle and/or its affiliates. All rights reserved.
|
||||
* 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.
|
||||
*
|
||||
* The contents of this file are subject to the terms of either the GNU
|
||||
* General Public License Version 2 only ("GPL") or the Common Development
|
||||
* and Distribution License("CDDL") (collectively, the "License"). You
|
||||
* may not use this file except in compliance with the License. You can
|
||||
* obtain a copy of the License at
|
||||
* https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
|
||||
* or packager/legal/LICENSE.txt. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
* 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).
|
||||
*
|
||||
* When distributing the software, include this License Header Notice in each
|
||||
* file and include the License file at packager/legal/LICENSE.txt.
|
||||
* 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.
|
||||
*
|
||||
* GPL Classpath Exception:
|
||||
* Oracle designates this particular file as subject to the "Classpath"
|
||||
* exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
* file that accompanied this code.
|
||||
*
|
||||
* Modifications:
|
||||
* If applicable, add the following below the License Header, with the fields
|
||||
* enclosed by brackets [] replaced by your own identifying information:
|
||||
* "Portions Copyright [year] [name of copyright owner]"
|
||||
*
|
||||
* Contributor(s):
|
||||
* If you wish your version of this file to be governed by only the CDDL or
|
||||
* only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
* elects to include this software in this distribution under the [CDDL or GPL
|
||||
* Version 2] license." If you don't indicate a single choice of license, a
|
||||
* recipient has the option to distribute your version of this file under
|
||||
* either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
* its licensees as provided above. However, if you add GPL Version 2 code
|
||||
* and therefore, elected the GPL Version 2 license, then the option applies
|
||||
* only if the new code is made subject to such option by the copyright
|
||||
* holder.
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.org.jvnet.ws.databinding;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
|
||||
@ -1,41 +1,26 @@
|
||||
/*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright (c) 1997-2011 Oracle and/or its affiliates. All rights reserved.
|
||||
* 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.
|
||||
*
|
||||
* The contents of this file are subject to the terms of either the GNU
|
||||
* General Public License Version 2 only ("GPL") or the Common Development
|
||||
* and Distribution License("CDDL") (collectively, the "License"). You
|
||||
* may not use this file except in compliance with the License. You can
|
||||
* obtain a copy of the License at
|
||||
* https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
|
||||
* or packager/legal/LICENSE.txt. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
* 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).
|
||||
*
|
||||
* When distributing the software, include this License Header Notice in each
|
||||
* file and include the License file at packager/legal/LICENSE.txt.
|
||||
* 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.
|
||||
*
|
||||
* GPL Classpath Exception:
|
||||
* Oracle designates this particular file as subject to the "Classpath"
|
||||
* exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
* file that accompanied this code.
|
||||
*
|
||||
* Modifications:
|
||||
* If applicable, add the following below the License Header, with the fields
|
||||
* enclosed by brackets [] replaced by your own identifying information:
|
||||
* "Portions Copyright [year] [name of copyright owner]"
|
||||
*
|
||||
* Contributor(s):
|
||||
* If you wish your version of this file to be governed by only the CDDL or
|
||||
* only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
* elects to include this software in this distribution under the [CDDL or GPL
|
||||
* Version 2] license." If you don't indicate a single choice of license, a
|
||||
* recipient has the option to distribute your version of this file under
|
||||
* either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
* its licensees as provided above. However, if you add GPL Version 2 code
|
||||
* and therefore, elected the GPL Version 2 license, then the option applies
|
||||
* only if the new code is made subject to such option by the copyright
|
||||
* holder.
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.org.jvnet.ws.databinding;
|
||||
|
||||
@ -1,41 +1,26 @@
|
||||
/*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright (c) 1997-2011 Oracle and/or its affiliates. All rights reserved.
|
||||
* 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.
|
||||
*
|
||||
* The contents of this file are subject to the terms of either the GNU
|
||||
* General Public License Version 2 only ("GPL") or the Common Development
|
||||
* and Distribution License("CDDL") (collectively, the "License"). You
|
||||
* may not use this file except in compliance with the License. You can
|
||||
* obtain a copy of the License at
|
||||
* https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
|
||||
* or packager/legal/LICENSE.txt. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
* 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).
|
||||
*
|
||||
* When distributing the software, include this License Header Notice in each
|
||||
* file and include the License file at packager/legal/LICENSE.txt.
|
||||
* 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.
|
||||
*
|
||||
* GPL Classpath Exception:
|
||||
* Oracle designates this particular file as subject to the "Classpath"
|
||||
* exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
* file that accompanied this code.
|
||||
*
|
||||
* Modifications:
|
||||
* If applicable, add the following below the License Header, with the fields
|
||||
* enclosed by brackets [] replaced by your own identifying information:
|
||||
* "Portions Copyright [year] [name of copyright owner]"
|
||||
*
|
||||
* Contributor(s):
|
||||
* If you wish your version of this file to be governed by only the CDDL or
|
||||
* only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
* elects to include this software in this distribution under the [CDDL or GPL
|
||||
* Version 2] license." If you don't indicate a single choice of license, a
|
||||
* recipient has the option to distribute your version of this file under
|
||||
* either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
* its licensees as provided above. However, if you add GPL Version 2 code
|
||||
* and therefore, elected the GPL Version 2 license, then the option applies
|
||||
* only if the new code is made subject to such option by the copyright
|
||||
* holder.
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.org.jvnet.ws.databinding;
|
||||
|
||||
@ -1,41 +1,26 @@
|
||||
/*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright (c) 1997-2011 Oracle and/or its affiliates. All rights reserved.
|
||||
* 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.
|
||||
*
|
||||
* The contents of this file are subject to the terms of either the GNU
|
||||
* General Public License Version 2 only ("GPL") or the Common Development
|
||||
* and Distribution License("CDDL") (collectively, the "License"). You
|
||||
* may not use this file except in compliance with the License. You can
|
||||
* obtain a copy of the License at
|
||||
* https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
|
||||
* or packager/legal/LICENSE.txt. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
* 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).
|
||||
*
|
||||
* When distributing the software, include this License Header Notice in each
|
||||
* file and include the License file at packager/legal/LICENSE.txt.
|
||||
* 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.
|
||||
*
|
||||
* GPL Classpath Exception:
|
||||
* Oracle designates this particular file as subject to the "Classpath"
|
||||
* exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
* file that accompanied this code.
|
||||
*
|
||||
* Modifications:
|
||||
* If applicable, add the following below the License Header, with the fields
|
||||
* enclosed by brackets [] replaced by your own identifying information:
|
||||
* "Portions Copyright [year] [name of copyright owner]"
|
||||
*
|
||||
* Contributor(s):
|
||||
* If you wish your version of this file to be governed by only the CDDL or
|
||||
* only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
* elects to include this software in this distribution under the [CDDL or GPL
|
||||
* Version 2] license." If you don't indicate a single choice of license, a
|
||||
* recipient has the option to distribute your version of this file under
|
||||
* either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
* its licensees as provided above. However, if you add GPL Version 2 code
|
||||
* and therefore, elected the GPL Version 2 license, then the option applies
|
||||
* only if the new code is made subject to such option by the copyright
|
||||
* holder.
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.org.jvnet.ws.message;
|
||||
|
||||
@ -1,41 +1,26 @@
|
||||
/*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved.
|
||||
* 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.
|
||||
*
|
||||
* The contents of this file are subject to the terms of either the GNU
|
||||
* General Public License Version 2 only ("GPL") or the Common Development
|
||||
* and Distribution License("CDDL") (collectively, the "License"). You
|
||||
* may not use this file except in compliance with the License. You can
|
||||
* obtain a copy of the License at
|
||||
* https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
|
||||
* or packager/legal/LICENSE.txt. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
* 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).
|
||||
*
|
||||
* When distributing the software, include this License Header Notice in each
|
||||
* file and include the License file at packager/legal/LICENSE.txt.
|
||||
* 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.
|
||||
*
|
||||
* GPL Classpath Exception:
|
||||
* Oracle designates this particular file as subject to the "Classpath"
|
||||
* exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
* file that accompanied this code.
|
||||
*
|
||||
* Modifications:
|
||||
* If applicable, add the following below the License Header, with the fields
|
||||
* enclosed by brackets [] replaced by your own identifying information:
|
||||
* "Portions Copyright [year] [name of copyright owner]"
|
||||
*
|
||||
* Contributor(s):
|
||||
* If you wish your version of this file to be governed by only the CDDL or
|
||||
* only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
* elects to include this software in this distribution under the [CDDL or GPL
|
||||
* Version 2] license." If you don't indicate a single choice of license, a
|
||||
* recipient has the option to distribute your version of this file under
|
||||
* either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
* its licensees as provided above. However, if you add GPL Version 2 code
|
||||
* and therefore, elected the GPL Version 2 license, then the option applies
|
||||
* only if the new code is made subject to such option by the copyright
|
||||
* holder.
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.org.jvnet.ws.message;
|
||||
|
||||
@ -1,41 +1,26 @@
|
||||
/*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright (c) 1997-2011 Oracle and/or its affiliates. All rights reserved.
|
||||
* 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.
|
||||
*
|
||||
* The contents of this file are subject to the terms of either the GNU
|
||||
* General Public License Version 2 only ("GPL") or the Common Development
|
||||
* and Distribution License("CDDL") (collectively, the "License"). You
|
||||
* may not use this file except in compliance with the License. You can
|
||||
* obtain a copy of the License at
|
||||
* https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
|
||||
* or packager/legal/LICENSE.txt. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
* 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).
|
||||
*
|
||||
* When distributing the software, include this License Header Notice in each
|
||||
* file and include the License file at packager/legal/LICENSE.txt.
|
||||
* 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.
|
||||
*
|
||||
* GPL Classpath Exception:
|
||||
* Oracle designates this particular file as subject to the "Classpath"
|
||||
* exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
* file that accompanied this code.
|
||||
*
|
||||
* Modifications:
|
||||
* If applicable, add the following below the License Header, with the fields
|
||||
* enclosed by brackets [] replaced by your own identifying information:
|
||||
* "Portions Copyright [year] [name of copyright owner]"
|
||||
*
|
||||
* Contributor(s):
|
||||
* If you wish your version of this file to be governed by only the CDDL or
|
||||
* only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
* elects to include this software in this distribution under the [CDDL or GPL
|
||||
* Version 2] license." If you don't indicate a single choice of license, a
|
||||
* recipient has the option to distribute your version of this file under
|
||||
* either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
* its licensees as provided above. However, if you add GPL Version 2 code
|
||||
* and therefore, elected the GPL Version 2 license, then the option applies
|
||||
* only if the new code is made subject to such option by the copyright
|
||||
* holder.
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.org.jvnet.ws.message;
|
||||
|
||||
@ -1,3 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.org.jvnet.ws.message;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@ -1,41 +1,26 @@
|
||||
/*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright (c) 1997-2011 Oracle and/or its affiliates. All rights reserved.
|
||||
* 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.
|
||||
*
|
||||
* The contents of this file are subject to the terms of either the GNU
|
||||
* General Public License Version 2 only ("GPL") or the Common Development
|
||||
* and Distribution License("CDDL") (collectively, the "License"). You
|
||||
* may not use this file except in compliance with the License. You can
|
||||
* obtain a copy of the License at
|
||||
* https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
|
||||
* or packager/legal/LICENSE.txt. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
* 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).
|
||||
*
|
||||
* When distributing the software, include this License Header Notice in each
|
||||
* file and include the License file at packager/legal/LICENSE.txt.
|
||||
* 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.
|
||||
*
|
||||
* GPL Classpath Exception:
|
||||
* Oracle designates this particular file as subject to the "Classpath"
|
||||
* exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
* file that accompanied this code.
|
||||
*
|
||||
* Modifications:
|
||||
* If applicable, add the following below the License Header, with the fields
|
||||
* enclosed by brackets [] replaced by your own identifying information:
|
||||
* "Portions Copyright [year] [name of copyright owner]"
|
||||
*
|
||||
* Contributor(s):
|
||||
* If you wish your version of this file to be governed by only the CDDL or
|
||||
* only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
* elects to include this software in this distribution under the [CDDL or GPL
|
||||
* Version 2] license." If you don't indicate a single choice of license, a
|
||||
* recipient has the option to distribute your version of this file under
|
||||
* either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
* its licensees as provided above. However, if you add GPL Version 2 code
|
||||
* and therefore, elected the GPL Version 2 license, then the option applies
|
||||
* only if the new code is made subject to such option by the copyright
|
||||
* holder.
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.org.jvnet.ws.message;
|
||||
|
||||
@ -151,3 +151,4 @@ ec17fbe5b8fbc52da070eec43b4711d9354b2ab8 jdk8-b25
|
||||
c68342532e2e7deb3a25fc04ed3e4c142278f747 jdk8-b27
|
||||
1e1d41daaded291ab3a370ca6a27f7325701978e jdk8-b28
|
||||
c5b882dce0fe27e05dc64debc92b1fb9ebf880ec jdk8-b29
|
||||
cdbb33303ea344d5e9013e2dd642e7a6e7768db6 jdk8-b30
|
||||
|
||||
@ -67,7 +67,7 @@ ifeq ($(PLATFORM), linux)
|
||||
CXX = $(COMPILER_PATH)g++
|
||||
endif
|
||||
# Option used to create a shared library
|
||||
SHARED_LIBRARY_FLAG = -shared -mimpure-text
|
||||
SHARED_LIBRARY_FLAG = -shared
|
||||
SUN_COMP_VER := $(shell $(CC) --verbose 2>&1 )
|
||||
|
||||
endif
|
||||
|
||||
@ -90,7 +90,7 @@ ifeq ($(OSNAME), linux)
|
||||
OBJECTS=$(SOURCES:%.c=%.o)
|
||||
# Library name and options needed to build it
|
||||
LIBRARY=lib$(LIBNAME).so
|
||||
LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc -mimpure-text
|
||||
LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc
|
||||
# Libraries we are dependent on
|
||||
LIBRARIES=-lc
|
||||
# Building a shared library
|
||||
|
||||
@ -90,7 +90,7 @@ ifeq ($(OSNAME), linux)
|
||||
OBJECTS=$(SOURCES:%.c=%.o)
|
||||
# Library name and options needed to build it
|
||||
LIBRARY=lib$(LIBNAME).so
|
||||
LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc -mimpure-text
|
||||
LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc
|
||||
# Libraries we are dependent on
|
||||
LIBRARIES=-lc
|
||||
# Building a shared library
|
||||
|
||||
@ -94,7 +94,7 @@ ifeq ($(OSNAME), linux)
|
||||
OBJECTS=$(SOURCES:%.c=%.o)
|
||||
# Library name and options needed to build it
|
||||
LIBRARY=lib$(LIBNAME).so
|
||||
LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc -mimpure-text
|
||||
LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc
|
||||
# Libraries we are dependent on
|
||||
LIBRARIES=-L $(JDK)/jre/lib/$(LIBARCH) -ljava_crw_demo -lc
|
||||
# Building a shared library
|
||||
|
||||
@ -90,7 +90,7 @@ ifeq ($(OSNAME), linux)
|
||||
OBJECTS=$(SOURCES:%.c=%.o)
|
||||
# Library name and options needed to build it
|
||||
LIBRARY=lib$(LIBNAME).so
|
||||
LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc -mimpure-text
|
||||
LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc
|
||||
# Libraries we are dependent on
|
||||
LIBRARIES=-lc
|
||||
# Building a shared library
|
||||
|
||||
@ -130,7 +130,7 @@ ifeq ($(OSNAME), linux)
|
||||
OBJECTS=$(SOURCES:%.c=%.o)
|
||||
# Library name and options needed to build it
|
||||
LIBRARY=lib$(LIBNAME).so
|
||||
LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc -mimpure-text
|
||||
LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc
|
||||
# Libraries we are dependent on
|
||||
LIBRARIES= -ldl -lc
|
||||
# Building a shared library
|
||||
|
||||
@ -308,7 +308,7 @@ For X86:
|
||||
<code><ul>
|
||||
gcc -O2 -fPIC -pthread -DLINUX -c <i>*.c</i>
|
||||
<br>
|
||||
gcc -z defs -static-libgcc -shared -mimpure-text -o <i>libXXX.so *.o</i> -lc
|
||||
gcc -z defs -static-libgcc -shared -o <i>libXXX.so *.o</i> -lc
|
||||
</code></ul>
|
||||
<br>
|
||||
For AMD64:
|
||||
@ -316,7 +316,7 @@ For AMD64:
|
||||
<code><ul>
|
||||
gcc -O2 -fPIC -pthread -DLINUX -D_LP64=1 -c <i>*.c</i>
|
||||
<br>
|
||||
gcc -z defs -static-libgcc -shared -mimpure-text -o <i>libXXX.so *.o</i> -lc
|
||||
gcc -z defs -static-libgcc -shared -o <i>libXXX.so *.o</i> -lc
|
||||
</code></ul>
|
||||
<br>
|
||||
</li>
|
||||
@ -339,7 +339,7 @@ option.
|
||||
</li>
|
||||
|
||||
<li>
|
||||
Library: Use -static-libgcc -mimpure-text.
|
||||
Library: Use -static-libgcc.
|
||||
<br>
|
||||
When building the shared library (-shared option), this option
|
||||
allows for maximum portability of the library between different
|
||||
|
||||
@ -90,7 +90,7 @@ ifeq ($(OSNAME), linux)
|
||||
OBJECTS=$(SOURCES:%.c=%.o)
|
||||
# Library name and options needed to build it
|
||||
LIBRARY=lib$(LIBNAME).so
|
||||
LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc -mimpure-text
|
||||
LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc
|
||||
# Libraries we are dependent on
|
||||
LIBRARIES=-lc
|
||||
# Building a shared library
|
||||
|
||||
@ -94,7 +94,7 @@ ifeq ($(OSNAME), linux)
|
||||
OBJECTS=$(SOURCES:%.c=%.o)
|
||||
# Library name and options needed to build it
|
||||
LIBRARY=lib$(LIBNAME).so
|
||||
LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc -mimpure-text
|
||||
LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc
|
||||
# Libraries we are dependent on
|
||||
LIBRARIES=-L $(JDK)/jre/lib/$(LIBARCH) -ljava_crw_demo -lc
|
||||
# Building a shared library
|
||||
|
||||
@ -94,7 +94,7 @@ ifeq ($(OSNAME), linux)
|
||||
OBJECTS=$(SOURCES:%.c=%.o)
|
||||
# Library name and options needed to build it
|
||||
LIBRARY=lib$(LIBNAME).so
|
||||
LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc -mimpure-text
|
||||
LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc
|
||||
# Libraries we are dependent on
|
||||
LIBRARIES=-L $(JDK)/jre/lib/$(LIBARCH) -ljava_crw_demo -lc
|
||||
# Building a shared library
|
||||
|
||||
@ -90,7 +90,7 @@ ifeq ($(OSNAME), linux)
|
||||
OBJECTS=$(SOURCES:%.c=%.o)
|
||||
# Library name and options needed to build it
|
||||
LIBRARY=lib$(LIBNAME).so
|
||||
LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc -mimpure-text
|
||||
LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc
|
||||
# Libraries we are dependent on
|
||||
LIBRARIES=-lc
|
||||
# Building a shared library
|
||||
|
||||
@ -91,7 +91,7 @@ ifeq ($(OSNAME), linux)
|
||||
OBJECTS=$(SOURCES:%.cpp=%.o)
|
||||
# Library name and options needed to build it
|
||||
LIBRARY=lib$(LIBNAME).so
|
||||
LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc -mimpure-text
|
||||
LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc
|
||||
# Libraries we are dependent on
|
||||
LIBRARIES=
|
||||
# Building a shared library
|
||||
|
||||
@ -2,3 +2,4 @@
|
||||
^dist/
|
||||
/nbproject/private/
|
||||
^.hgtip
|
||||
.DS_Store
|
||||
|
||||
@ -150,3 +150,4 @@ bcb21abf1c4177baf4574f99709513dcd4474727 jdk8-b21
|
||||
b556aa8a99c358469861770aebdce884e06fa178 jdk8-b26
|
||||
be456f9c64e818161c789252145d4ddc292ae863 jdk8-b27
|
||||
5bed623b0c773aa8a8d5f8d4004ce9d3974143cc jdk8-b28
|
||||
e974e82abe51ef66dc32bb6ab5d0733753d3c7d7 jdk8-b29
|
||||
|
||||
@ -862,7 +862,8 @@
|
||||
source="${boot.javac.source}"
|
||||
target="${boot.javac.target}"
|
||||
executable="${boot.java.home}/bin/javac"
|
||||
srcdir="${make.tools.dir}/CompileProperties"
|
||||
srcdir="${make.tools.dir}"
|
||||
includes="compileproperties/* anttasks/CompileProperties*"
|
||||
destdir="${build.toolclasses.dir}/"
|
||||
classpath="${ant.core.lib}"
|
||||
bootclasspath="${boot.java.home}/jre/lib/rt.jar"
|
||||
@ -870,7 +871,7 @@
|
||||
<compilerarg line="${javac.lint.opts}"/>
|
||||
</javac>
|
||||
<taskdef name="pcompile"
|
||||
classname="CompilePropertiesTask"
|
||||
classname="anttasks.CompilePropertiesTask"
|
||||
classpath="${build.toolclasses.dir}/"/>
|
||||
</target>
|
||||
|
||||
@ -880,7 +881,8 @@
|
||||
source="${boot.javac.source}"
|
||||
target="${boot.javac.target}"
|
||||
executable="${boot.java.home}/bin/javac"
|
||||
srcdir="${make.tools.dir}/GenStubs"
|
||||
srcdir="${make.tools.dir}"
|
||||
includes="genstubs/* anttasks/GenStubs*"
|
||||
destdir="${build.toolclasses.dir}/"
|
||||
classpath="${ant.core.lib}"
|
||||
includeantruntime="false">
|
||||
@ -888,7 +890,7 @@
|
||||
<compilerarg line="${javac.lint.opts}"/>
|
||||
</javac>
|
||||
<taskdef name="genstubs"
|
||||
classname="GenStubs$$Ant"
|
||||
classname="anttasks.GenStubsTask"
|
||||
classpath="${build.toolclasses.dir}/"/>
|
||||
</target>
|
||||
|
||||
|
||||
@ -39,6 +39,7 @@ jprt.build.targets= \
|
||||
solaris_x64_5.10-{product|fastdebug}, \
|
||||
linux_i586_2.6-{product|fastdebug}, \
|
||||
linux_x64_2.6-{product|fastdebug}, \
|
||||
macosx_x64_10.7-{product|fastdebug}, \
|
||||
windows_i586_5.1-{product|fastdebug}, \
|
||||
windows_x64_5.2-{product|fastdebug}
|
||||
|
||||
@ -50,6 +51,7 @@ jprt.my.test.target.set= \
|
||||
solaris_x64_5.10-product-c2-TESTNAME, \
|
||||
linux_i586_2.6-product-{c1|c2}-TESTNAME, \
|
||||
linux_x64_2.6-product-c2-TESTNAME, \
|
||||
macosx_x64_10.7-product-c2-TESTNAME, \
|
||||
windows_i586_5.1-product-c1-TESTNAME, \
|
||||
windows_x64_5.2-product-c2-TESTNAME
|
||||
|
||||
@ -60,3 +62,18 @@ jprt.make.rule.test.targets= \
|
||||
# Directories to be excluded from the source bundles
|
||||
jprt.bundle.exclude.src.dirs=build dist webrev
|
||||
|
||||
# Test target list (no fastdebug & limited c2 testing)
|
||||
jprt.my.test.target.set= \
|
||||
solaris_sparc_5.10-product-c1-TESTNAME, \
|
||||
solaris_sparcv9_5.10-product-c2-TESTNAME, \
|
||||
solaris_i586_5.10-product-c1-TESTNAME, \
|
||||
solaris_x64_5.10-product-c2-TESTNAME, \
|
||||
linux_i586_2.6-product-{c1|c2}-TESTNAME, \
|
||||
linux_x64_2.6-product-c2-TESTNAME, \
|
||||
macosx_x64_10.7-product-c2-TESTNAME, \
|
||||
windows_i586_5.1-product-c1-TESTNAME, \
|
||||
windows_x64_5.2-product-c2-TESTNAME
|
||||
|
||||
# Default test targets
|
||||
jprt.make.rule.test.targets= \
|
||||
${jprt.my.test.target.set:TESTNAME=jtreg}
|
||||
|
||||
@ -261,7 +261,8 @@
|
||||
|
||||
<target name="-def-select-tool">
|
||||
<mkdir dir="${build.toolclasses.dir}"/>
|
||||
<javac srcdir="${make.tools.dir}/SelectTool"
|
||||
<javac srcdir="${make.tools.dir}"
|
||||
includes="anttasks/SelectTool*"
|
||||
destdir="${build.toolclasses.dir}/"
|
||||
classpath="${ant.core.lib}"
|
||||
includeantruntime="false"
|
||||
@ -270,7 +271,7 @@
|
||||
<compilerarg line="-Xlint"/>
|
||||
</javac>
|
||||
<taskdef name="select-tool"
|
||||
classname="SelectToolTask"
|
||||
classname="anttasks.SelectToolTask"
|
||||
classpath="${build.toolclasses.dir}/"/>
|
||||
</target>
|
||||
|
||||
|
||||
@ -23,6 +23,10 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package anttasks;
|
||||
|
||||
import compileproperties.CompileProperties;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
162
langtools/make/tools/anttasks/GenStubsTask.java
Normal file
162
langtools/make/tools/anttasks/GenStubsTask.java
Normal file
@ -0,0 +1,162 @@
|
||||
/*
|
||||
* Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package anttasks;
|
||||
|
||||
import genstubs.GenStubs;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import org.apache.tools.ant.BuildException;
|
||||
import org.apache.tools.ant.DirectoryScanner;
|
||||
import org.apache.tools.ant.taskdefs.MatchingTask;
|
||||
import org.apache.tools.ant.types.Path;
|
||||
import org.apache.tools.ant.types.Reference;
|
||||
|
||||
/**
|
||||
* Files are specified with an implicit fileset, using srcdir as a base directory.
|
||||
* The set of files to be included is specified with an includes attribute or
|
||||
* nested <includes> set. However, unlike a normal fileset, an empty includes attribute
|
||||
* means "no files" instead of "all files". The Ant task also accepts "fork=true" and
|
||||
* classpath attribute or nested <classpath> element to run GenStubs in a separate VM
|
||||
* with the specified path. This is likely necessary if a JDK 7 parser is required to read the
|
||||
* JDK 7 input files.
|
||||
*/
|
||||
public class GenStubsTask extends MatchingTask {
|
||||
private File srcDir;
|
||||
private File destDir;
|
||||
private boolean fork;
|
||||
private Path classpath;
|
||||
private String includes;
|
||||
|
||||
public void setSrcDir(File dir) {
|
||||
this.srcDir = dir;
|
||||
}
|
||||
|
||||
public void setDestDir(File dir) {
|
||||
this.destDir = dir;
|
||||
}
|
||||
|
||||
public void setFork(boolean v) {
|
||||
this.fork = v;
|
||||
}
|
||||
|
||||
public void setClasspath(Path cp) {
|
||||
if (classpath == null)
|
||||
classpath = cp;
|
||||
else
|
||||
classpath.append(cp);
|
||||
}
|
||||
|
||||
public Path createClasspath() {
|
||||
if (classpath == null) {
|
||||
classpath = new Path(getProject());
|
||||
}
|
||||
return classpath.createPath();
|
||||
}
|
||||
|
||||
public void setClasspathRef(Reference r) {
|
||||
createClasspath().setRefid(r);
|
||||
}
|
||||
|
||||
public void setIncludes(String includes) {
|
||||
super.setIncludes(includes);
|
||||
this.includes = includes;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
if (includes != null && includes.trim().isEmpty())
|
||||
return;
|
||||
|
||||
DirectoryScanner s = getDirectoryScanner(srcDir);
|
||||
String[] files = s.getIncludedFiles();
|
||||
// System.err.println("Ant.execute: srcDir " + srcDir);
|
||||
// System.err.println("Ant.execute: destDir " + destDir);
|
||||
// System.err.println("Ant.execute: files " + Arrays.asList(files));
|
||||
|
||||
files = filter(srcDir, destDir, files);
|
||||
if (files.length == 0)
|
||||
return;
|
||||
System.out.println("Generating " + files.length + " stub files to " + destDir);
|
||||
|
||||
List<String> classNames = new ArrayList<String>();
|
||||
for (String file: files) {
|
||||
classNames.add(file.replaceAll(".java$", "").replace('/', '.'));
|
||||
}
|
||||
|
||||
if (!fork) {
|
||||
GenStubs m = new GenStubs();
|
||||
boolean ok = m.run(srcDir.getPath(), destDir, classNames);
|
||||
if (!ok)
|
||||
throw new BuildException("genstubs failed");
|
||||
} else {
|
||||
List<String> cmd = new ArrayList<String>();
|
||||
String java_home = System.getProperty("java.home");
|
||||
cmd.add(new File(new File(java_home, "bin"), "java").getPath());
|
||||
if (classpath != null)
|
||||
cmd.add("-Xbootclasspath/p:" + classpath);
|
||||
cmd.add(GenStubs.class.getName());
|
||||
cmd.add("-sourcepath");
|
||||
cmd.add(srcDir.getPath());
|
||||
cmd.add("-s");
|
||||
cmd.add(destDir.getPath());
|
||||
cmd.addAll(classNames);
|
||||
//System.err.println("GenStubs exec " + cmd);
|
||||
ProcessBuilder pb = new ProcessBuilder(cmd);
|
||||
pb.redirectErrorStream(true);
|
||||
try {
|
||||
Process p = pb.start();
|
||||
BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
|
||||
try {
|
||||
String line;
|
||||
while ((line = in.readLine()) != null)
|
||||
System.out.println(line);
|
||||
} finally {
|
||||
in.close();
|
||||
}
|
||||
int rc = p.waitFor();
|
||||
if (rc != 0)
|
||||
throw new BuildException("genstubs failed");
|
||||
} catch (IOException e) {
|
||||
throw new BuildException("genstubs failed", e);
|
||||
} catch (InterruptedException e) {
|
||||
throw new BuildException("genstubs failed", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String[] filter(File srcDir, File destDir, String[] files) {
|
||||
List<String> results = new ArrayList<String>();
|
||||
for (String f: files) {
|
||||
long srcTime = new File(srcDir, f).lastModified();
|
||||
long destTime = new File(destDir, f).lastModified();
|
||||
if (srcTime > destTime)
|
||||
results.add(f);
|
||||
}
|
||||
return results.toArray(new String[results.size()]);
|
||||
}
|
||||
}
|
||||
@ -23,6 +23,8 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package anttasks;
|
||||
|
||||
import java.awt.GridBagConstraints;
|
||||
import java.awt.GridBagLayout;
|
||||
import java.awt.event.ActionEvent;
|
||||
@ -23,6 +23,8 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package compileproperties;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
@ -61,7 +63,7 @@ public class CompileProperties {
|
||||
}
|
||||
}
|
||||
|
||||
static interface Log {
|
||||
public static interface Log {
|
||||
void info(String msg);
|
||||
void verbose(String msg);
|
||||
void error(String msg, Exception e);
|
||||
@ -72,7 +74,7 @@ public class CompileProperties {
|
||||
private String supers[] ;
|
||||
private int compileCount = 0;
|
||||
private boolean quiet = false;
|
||||
private Log log;
|
||||
public Log log;
|
||||
|
||||
public void setLog(Log log) {
|
||||
this.log = log;
|
||||
@ -23,19 +23,14 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package genstubs;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
import javax.tools.JavaFileObject;
|
||||
import javax.tools.StandardJavaFileManager;
|
||||
import javax.tools.StandardLocation;
|
||||
|
||||
import org.apache.tools.ant.BuildException;
|
||||
import org.apache.tools.ant.DirectoryScanner;
|
||||
import org.apache.tools.ant.taskdefs.MatchingTask;
|
||||
import org.apache.tools.ant.types.Path;
|
||||
import org.apache.tools.ant.types.Reference;
|
||||
|
||||
|
||||
import com.sun.source.tree.CompilationUnitTree;
|
||||
import com.sun.source.util.JavacTask;
|
||||
import com.sun.tools.javac.api.JavacTool;
|
||||
@ -81,15 +76,6 @@ import javax.tools.JavaFileManager;
|
||||
* Documentation comments and annotations are removed. Method bodies are removed
|
||||
* and methods are marked native. Private and package-private field definitions
|
||||
* have their initializers replace with 0, 0.0, false, null as appropriate.
|
||||
*
|
||||
* An Ant task, Main$Ant is also provided. Files are specified with an implicit
|
||||
* fileset, using srcdir as a base directory. The set of files to be included
|
||||
* is specified with an includes attribute or nested <includes> set. However,
|
||||
* unlike a normal fileset, an empty includes attribute means "no files" instead
|
||||
* of "all files". The Ant task also accepts "fork=true" and classpath attribute
|
||||
* or nested <classpath> element to run GenStubs in a separate VM with the specified
|
||||
* path. This is likely necessary if a JDK 7 parser is required to read the
|
||||
* JDK 7 input files.
|
||||
*/
|
||||
|
||||
public class GenStubs {
|
||||
@ -110,7 +96,7 @@ public class GenStubs {
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
boolean run(String... args) {
|
||||
public boolean run(String... args) {
|
||||
File outdir = null;
|
||||
String sourcepath = null;
|
||||
List<String> classes = new ArrayList<String>();
|
||||
@ -132,7 +118,7 @@ public class GenStubs {
|
||||
return run(sourcepath, outdir, classes);
|
||||
}
|
||||
|
||||
boolean run(String sourcepath, File outdir, List<String> classes) {
|
||||
public boolean run(String sourcepath, File outdir, List<String> classes) {
|
||||
//System.err.println("run: sourcepath:" + sourcepath + " outdir:" + outdir + " classes:" + classes);
|
||||
if (sourcepath == null)
|
||||
throw new IllegalArgumentException("sourcepath not set");
|
||||
@ -298,9 +284,9 @@ public class GenStubs {
|
||||
tree.accept(this);
|
||||
ListBuffer<JCTree> defs = new ListBuffer<JCTree>();
|
||||
for (JCTree def: tree.defs) {
|
||||
if (def.getTag() == JCTree.IMPORT) {
|
||||
if (def.getTag() == JCTree.Tag.IMPORT) {
|
||||
JCImport imp = (JCImport) def;
|
||||
if (imp.qualid.getTag() == JCTree.SELECT) {
|
||||
if (imp.qualid.getTag() == JCTree.Tag.SELECT) {
|
||||
JCFieldAccess qualid = (JCFieldAccess) imp.qualid;
|
||||
if (!qualid.name.toString().equals("*")
|
||||
&& !names.contains(qualid.name)) {
|
||||
@ -327,122 +313,4 @@ public class GenStubs {
|
||||
names.add(tree.name);
|
||||
}
|
||||
}
|
||||
|
||||
//---------- Ant Invocation ------------------------------------------------
|
||||
|
||||
public static class Ant extends MatchingTask {
|
||||
private File srcDir;
|
||||
private File destDir;
|
||||
private boolean fork;
|
||||
private Path classpath;
|
||||
private String includes;
|
||||
|
||||
public void setSrcDir(File dir) {
|
||||
this.srcDir = dir;
|
||||
}
|
||||
|
||||
public void setDestDir(File dir) {
|
||||
this.destDir = dir;
|
||||
}
|
||||
|
||||
public void setFork(boolean v) {
|
||||
this.fork = v;
|
||||
}
|
||||
|
||||
public void setClasspath(Path cp) {
|
||||
if (classpath == null)
|
||||
classpath = cp;
|
||||
else
|
||||
classpath.append(cp);
|
||||
}
|
||||
|
||||
public Path createClasspath() {
|
||||
if (classpath == null) {
|
||||
classpath = new Path(getProject());
|
||||
}
|
||||
return classpath.createPath();
|
||||
}
|
||||
|
||||
public void setClasspathRef(Reference r) {
|
||||
createClasspath().setRefid(r);
|
||||
}
|
||||
|
||||
public void setIncludes(String includes) {
|
||||
super.setIncludes(includes);
|
||||
this.includes = includes;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
if (includes != null && includes.trim().isEmpty())
|
||||
return;
|
||||
|
||||
DirectoryScanner s = getDirectoryScanner(srcDir);
|
||||
String[] files = s.getIncludedFiles();
|
||||
// System.err.println("Ant.execute: srcDir " + srcDir);
|
||||
// System.err.println("Ant.execute: destDir " + destDir);
|
||||
// System.err.println("Ant.execute: files " + Arrays.asList(files));
|
||||
|
||||
files = filter(srcDir, destDir, files);
|
||||
if (files.length == 0)
|
||||
return;
|
||||
System.out.println("Generating " + files.length + " stub files to " + destDir);
|
||||
|
||||
List<String> classNames = new ArrayList<String>();
|
||||
for (String file: files) {
|
||||
classNames.add(file.replaceAll(".java$", "").replace('/', '.'));
|
||||
}
|
||||
|
||||
if (!fork) {
|
||||
GenStubs m = new GenStubs();
|
||||
boolean ok = m.run(srcDir.getPath(), destDir, classNames);
|
||||
if (!ok)
|
||||
throw new BuildException("genstubs failed");
|
||||
} else {
|
||||
List<String> cmd = new ArrayList<String>();
|
||||
String java_home = System.getProperty("java.home");
|
||||
cmd.add(new File(new File(java_home, "bin"), "java").getPath());
|
||||
if (classpath != null)
|
||||
cmd.add("-Xbootclasspath/p:" + classpath);
|
||||
cmd.add(GenStubs.class.getName());
|
||||
cmd.add("-sourcepath");
|
||||
cmd.add(srcDir.getPath());
|
||||
cmd.add("-s");
|
||||
cmd.add(destDir.getPath());
|
||||
cmd.addAll(classNames);
|
||||
//System.err.println("GenStubs exec " + cmd);
|
||||
ProcessBuilder pb = new ProcessBuilder(cmd);
|
||||
pb.redirectErrorStream(true);
|
||||
try {
|
||||
Process p = pb.start();
|
||||
BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
|
||||
try {
|
||||
String line;
|
||||
while ((line = in.readLine()) != null)
|
||||
System.out.println(line);
|
||||
} finally {
|
||||
in.close();
|
||||
}
|
||||
int rc = p.waitFor();
|
||||
if (rc != 0)
|
||||
throw new BuildException("genstubs failed");
|
||||
} catch (IOException e) {
|
||||
throw new BuildException("genstubs failed", e);
|
||||
} catch (InterruptedException e) {
|
||||
throw new BuildException("genstubs failed", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String[] filter(File srcDir, File destDir, String[] files) {
|
||||
List<String> results = new ArrayList<String>();
|
||||
for (String f: files) {
|
||||
long srcTime = new File(srcDir, f).lastModified();
|
||||
long destTime = new File(destDir, f).lastModified();
|
||||
if (srcTime > destTime)
|
||||
results.add(f);
|
||||
}
|
||||
return results.toArray(new String[results.size()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1235,7 +1235,7 @@ public abstract class Symbol implements Element {
|
||||
// if origin is derived from a raw type, we might have missed
|
||||
// an implementation because we do not know enough about instantiations.
|
||||
// in this case continue with the supertype as origin.
|
||||
if (types.isDerivedRaw(origin.type))
|
||||
if (types.isDerivedRaw(origin.type) && !origin.isInterface())
|
||||
return implementation(types.supertype(origin.type).tsym, types, checkResult);
|
||||
else
|
||||
return null;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2012, 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
|
||||
@ -199,16 +199,15 @@ public class Attr extends JCTree.Visitor {
|
||||
* @param tree The tree whose kind and type is checked
|
||||
* @param owntype The computed type of the tree
|
||||
* @param ownkind The computed kind of the tree
|
||||
* @param pkind The expected kind (or: protokind) of the tree
|
||||
* @param pt The expected type (or: prototype) of the tree
|
||||
* @param resultInfo The expected result of the tree
|
||||
*/
|
||||
Type check(JCTree tree, Type owntype, int ownkind, int pkind, Type pt) {
|
||||
if (owntype.tag != ERROR && pt.tag != METHOD && pt.tag != FORALL) {
|
||||
if ((ownkind & ~pkind) == 0) {
|
||||
owntype = chk.checkType(tree.pos(), owntype, pt, errKey);
|
||||
Type check(JCTree tree, Type owntype, int ownkind, ResultInfo resultInfo) {
|
||||
if (owntype.tag != ERROR && resultInfo.pt.tag != METHOD && resultInfo.pt.tag != FORALL) {
|
||||
if ((ownkind & ~resultInfo.pkind) == 0) {
|
||||
owntype = chk.checkType(tree.pos(), owntype, resultInfo.pt, errKey);
|
||||
} else {
|
||||
log.error(tree.pos(), "unexpected.type",
|
||||
kindNames(pkind),
|
||||
kindNames(resultInfo.pkind),
|
||||
kindName(ownkind));
|
||||
owntype = types.createErrorType(owntype);
|
||||
}
|
||||
@ -333,7 +332,16 @@ public class Attr extends JCTree.Visitor {
|
||||
public Type attribType(JCTree node, TypeSymbol sym) {
|
||||
Env<AttrContext> env = enter.typeEnvs.get(sym);
|
||||
Env<AttrContext> localEnv = env.dup(node, env.info.dup());
|
||||
return attribTree(node, localEnv, Kinds.TYP, Type.noType);
|
||||
return attribTree(node, localEnv, unknownTypeInfo);
|
||||
}
|
||||
|
||||
public Type attribImportQualifier(JCImport tree, Env<AttrContext> env) {
|
||||
// Attribute qualifying package or class.
|
||||
JCFieldAccess s = (JCFieldAccess)tree.qualid;
|
||||
return attribTree(s.selected,
|
||||
env,
|
||||
new ResultInfo(tree.staticImport ? TYP : (TYP | PCK),
|
||||
Type.noType));
|
||||
}
|
||||
|
||||
public Env<AttrContext> attribExprToTree(JCTree expr, Env<AttrContext> env, JCTree tree) {
|
||||
@ -386,6 +394,28 @@ public class Attr extends JCTree.Visitor {
|
||||
}
|
||||
}
|
||||
|
||||
static class ResultInfo {
|
||||
int pkind;
|
||||
Type pt;
|
||||
|
||||
ResultInfo(int pkind, Type pt) {
|
||||
this.pkind = pkind;
|
||||
this.pt = pt;
|
||||
}
|
||||
}
|
||||
|
||||
private final ResultInfo statInfo = new ResultInfo(NIL, Type.noType);
|
||||
private final ResultInfo varInfo = new ResultInfo(VAR, Type.noType);
|
||||
private final ResultInfo unknownExprInfo = new ResultInfo(VAL, Type.noType);
|
||||
private final ResultInfo unknownTypeInfo = new ResultInfo(TYP, Type.noType);
|
||||
|
||||
Type pt() {
|
||||
return resultInfo.pt;
|
||||
}
|
||||
|
||||
int pkind() {
|
||||
return resultInfo.pkind;
|
||||
}
|
||||
|
||||
/* ************************************************************************
|
||||
* Visitor methods
|
||||
@ -395,13 +425,9 @@ public class Attr extends JCTree.Visitor {
|
||||
*/
|
||||
Env<AttrContext> env;
|
||||
|
||||
/** Visitor argument: the currently expected proto-kind.
|
||||
/** Visitor argument: the currently expected attribution result.
|
||||
*/
|
||||
int pkind;
|
||||
|
||||
/** Visitor argument: the currently expected proto-type.
|
||||
*/
|
||||
Type pt;
|
||||
ResultInfo resultInfo;
|
||||
|
||||
/** Visitor argument: the error key to be generated when a type error occurs
|
||||
*/
|
||||
@ -416,22 +442,19 @@ public class Attr extends JCTree.Visitor {
|
||||
*
|
||||
* @param tree The tree to be visited.
|
||||
* @param env The environment visitor argument.
|
||||
* @param pkind The protokind visitor argument.
|
||||
* @param pt The prototype visitor argument.
|
||||
* @param resultInfo The result info visitor argument.
|
||||
*/
|
||||
Type attribTree(JCTree tree, Env<AttrContext> env, int pkind, Type pt) {
|
||||
return attribTree(tree, env, pkind, pt, "incompatible.types");
|
||||
private Type attribTree(JCTree tree, Env<AttrContext> env, ResultInfo resultInfo) {
|
||||
return attribTree(tree, env, resultInfo, "incompatible.types");
|
||||
}
|
||||
|
||||
Type attribTree(JCTree tree, Env<AttrContext> env, int pkind, Type pt, String errKey) {
|
||||
private Type attribTree(JCTree tree, Env<AttrContext> env, ResultInfo resultInfo, String errKey) {
|
||||
Env<AttrContext> prevEnv = this.env;
|
||||
int prevPkind = this.pkind;
|
||||
Type prevPt = this.pt;
|
||||
ResultInfo prevResult = this.resultInfo;
|
||||
String prevErrKey = this.errKey;
|
||||
try {
|
||||
this.env = env;
|
||||
this.pkind = pkind;
|
||||
this.pt = pt;
|
||||
this.resultInfo = resultInfo;
|
||||
this.errKey = errKey;
|
||||
tree.accept(this);
|
||||
if (tree == breakTree)
|
||||
@ -442,8 +465,7 @@ public class Attr extends JCTree.Visitor {
|
||||
return chk.completionError(tree.pos(), ex);
|
||||
} finally {
|
||||
this.env = prevEnv;
|
||||
this.pkind = prevPkind;
|
||||
this.pt = prevPt;
|
||||
this.resultInfo = prevResult;
|
||||
this.errKey = prevErrKey;
|
||||
}
|
||||
}
|
||||
@ -451,18 +473,18 @@ public class Attr extends JCTree.Visitor {
|
||||
/** Derived visitor method: attribute an expression tree.
|
||||
*/
|
||||
public Type attribExpr(JCTree tree, Env<AttrContext> env, Type pt) {
|
||||
return attribTree(tree, env, VAL, pt.tag != ERROR ? pt : Type.noType);
|
||||
return attribExpr(tree, env, pt, "incompatible.types");
|
||||
}
|
||||
|
||||
public Type attribExpr(JCTree tree, Env<AttrContext> env, Type pt, String key) {
|
||||
return attribTree(tree, env, VAL, pt.tag != ERROR ? pt : Type.noType, key);
|
||||
return attribTree(tree, env, new ResultInfo(VAL, pt.tag != ERROR ? pt : Type.noType), key);
|
||||
}
|
||||
|
||||
/** Derived visitor method: attribute an expression tree with
|
||||
* no constraints on the computed type.
|
||||
*/
|
||||
Type attribExpr(JCTree tree, Env<AttrContext> env) {
|
||||
return attribTree(tree, env, VAL, Type.noType);
|
||||
return attribTree(tree, env, unknownExprInfo);
|
||||
}
|
||||
|
||||
/** Derived visitor method: attribute a type tree.
|
||||
@ -475,14 +497,14 @@ public class Attr extends JCTree.Visitor {
|
||||
/** Derived visitor method: attribute a type tree.
|
||||
*/
|
||||
Type attribType(JCTree tree, Env<AttrContext> env, Type pt) {
|
||||
Type result = attribTree(tree, env, TYP, pt);
|
||||
Type result = attribTree(tree, env, new ResultInfo(TYP, pt));
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Derived visitor method: attribute a statement or definition tree.
|
||||
*/
|
||||
public Type attribStat(JCTree tree, Env<AttrContext> env) {
|
||||
return attribTree(tree, env, NIL, Type.noType);
|
||||
return attribTree(tree, env, statInfo);
|
||||
}
|
||||
|
||||
/** Attribute a list of expressions, returning a list of types.
|
||||
@ -507,7 +529,7 @@ public class Attr extends JCTree.Visitor {
|
||||
ListBuffer<Type> argtypes = new ListBuffer<Type>();
|
||||
for (List<JCExpression> l = trees; l.nonEmpty(); l = l.tail)
|
||||
argtypes.append(chk.checkNonVoid(
|
||||
l.head.pos(), types.upperBound(attribTree(l.head, env, VAL, Infer.anyPoly))));
|
||||
l.head.pos(), types.upperBound(attribExpr(l.head, env, Infer.anyPoly))));
|
||||
return argtypes.toList();
|
||||
}
|
||||
|
||||
@ -1181,7 +1203,7 @@ public class Attr extends JCTree.Visitor {
|
||||
result = check(tree,
|
||||
capture(condType(tree.pos(), tree.cond.type,
|
||||
tree.truepart.type, tree.falsepart.type)),
|
||||
VAL, pkind, pt);
|
||||
VAL, resultInfo);
|
||||
}
|
||||
//where
|
||||
/** Compute the type of a conditional expression, after
|
||||
@ -1500,8 +1522,8 @@ public class Attr extends JCTree.Visitor {
|
||||
// ...and check that it is legal in the current context.
|
||||
// (this will also set the tree's type)
|
||||
Type mpt = newMethTemplate(argtypes, typeargtypes);
|
||||
checkId(tree.meth, site, sym, localEnv, MTH,
|
||||
mpt, tree.varargsElement != null);
|
||||
checkId(tree.meth, site, sym, localEnv, new ResultInfo(MTH, mpt),
|
||||
tree.varargsElement != null);
|
||||
}
|
||||
// Otherwise, `site' is an error type and we do nothing
|
||||
}
|
||||
@ -1518,8 +1540,6 @@ public class Attr extends JCTree.Visitor {
|
||||
Type mpt = newMethTemplate(argtypes, typeargtypes);
|
||||
localEnv.info.varArgs = false;
|
||||
Type mtype = attribExpr(tree.meth, localEnv, mpt);
|
||||
if (localEnv.info.varArgs)
|
||||
Assert.check(mtype.isErroneous() || tree.varargsElement != null);
|
||||
|
||||
// Compute the result type.
|
||||
Type restype = mtype.getReturnType();
|
||||
@ -1552,7 +1572,10 @@ public class Attr extends JCTree.Visitor {
|
||||
|
||||
// Check that value of resulting type is admissible in the
|
||||
// current context. Also, capture the return type
|
||||
result = check(tree, capture(restype), VAL, pkind, pt);
|
||||
result = check(tree, capture(restype), VAL, resultInfo);
|
||||
|
||||
if (localEnv.info.varArgs)
|
||||
Assert.check(result.isErroneous() || tree.varargsElement != null);
|
||||
}
|
||||
chk.validate(tree.typeargs, localEnv);
|
||||
}
|
||||
@ -1627,7 +1650,6 @@ public class Attr extends JCTree.Visitor {
|
||||
// Attribute clazz expression and store
|
||||
// symbol + type back into the attributed tree.
|
||||
Type clazztype = attribType(clazz, env);
|
||||
Pair<Scope,Scope> mapping = getSyntheticScopeMapping(clazztype);
|
||||
clazztype = chk.checkDiamond(tree, clazztype);
|
||||
chk.validate(clazz, localEnv);
|
||||
if (tree.encl != null) {
|
||||
@ -1654,7 +1676,7 @@ public class Attr extends JCTree.Visitor {
|
||||
List<Type> typeargtypes = attribTypes(tree.typeargs, localEnv);
|
||||
|
||||
if (TreeInfo.isDiamond(tree) && !clazztype.isErroneous()) {
|
||||
clazztype = attribDiamond(localEnv, tree, clazztype, mapping, argtypes, typeargtypes);
|
||||
clazztype = attribDiamond(localEnv, tree, clazztype, argtypes, typeargtypes);
|
||||
clazz.type = clazztype;
|
||||
} else if (allowDiamondFinder &&
|
||||
tree.def == null &&
|
||||
@ -1671,7 +1693,6 @@ public class Attr extends JCTree.Visitor {
|
||||
inferred = attribDiamond(localEnv,
|
||||
tree,
|
||||
clazztype,
|
||||
mapping,
|
||||
argtypes,
|
||||
typeargtypes);
|
||||
}
|
||||
@ -1682,7 +1703,7 @@ public class Attr extends JCTree.Visitor {
|
||||
if (inferred != null &&
|
||||
!inferred.isErroneous() &&
|
||||
inferred.tag == CLASS &&
|
||||
types.isAssignable(inferred, pt.tag == NONE ? clazztype : pt, Warner.noWarnings)) {
|
||||
types.isAssignable(inferred, pt().tag == NONE ? clazztype : pt(), Warner.noWarnings)) {
|
||||
String key = types.isSameType(clazztype, inferred) ?
|
||||
"diamond.redundant.args" :
|
||||
"diamond.redundant.args.1";
|
||||
@ -1732,7 +1753,7 @@ public class Attr extends JCTree.Visitor {
|
||||
tree.pos(), rsEnv, clazztype, argtypes, typeargtypes);
|
||||
tree.constructorType = tree.constructor.type.isErroneous() ?
|
||||
syms.errType :
|
||||
checkMethod(clazztype,
|
||||
checkConstructor(clazztype,
|
||||
tree.constructor,
|
||||
rsEnv,
|
||||
tree.args,
|
||||
@ -1807,7 +1828,7 @@ public class Attr extends JCTree.Visitor {
|
||||
tree.constructorType = syms.errType;
|
||||
}
|
||||
else {
|
||||
tree.constructorType = checkMethod(clazztype,
|
||||
tree.constructorType = checkConstructor(clazztype,
|
||||
tree.constructor,
|
||||
localEnv,
|
||||
tree.args,
|
||||
@ -1820,19 +1841,17 @@ public class Attr extends JCTree.Visitor {
|
||||
if (tree.constructor != null && tree.constructor.kind == MTH)
|
||||
owntype = clazztype;
|
||||
}
|
||||
result = check(tree, owntype, VAL, pkind, pt);
|
||||
result = check(tree, owntype, VAL, resultInfo);
|
||||
chk.validate(tree.typeargs, localEnv);
|
||||
}
|
||||
|
||||
Type attribDiamond(Env<AttrContext> env,
|
||||
JCNewClass tree,
|
||||
Type clazztype,
|
||||
Pair<Scope, Scope> mapping,
|
||||
List<Type> argtypes,
|
||||
List<Type> typeargtypes) {
|
||||
if (clazztype.isErroneous() ||
|
||||
clazztype.isInterface() ||
|
||||
mapping == erroneousMapping) {
|
||||
clazztype.isInterface()) {
|
||||
//if the type of the instance creation expression is erroneous,
|
||||
//or if it's an interface, or if something prevented us to form a valid
|
||||
//mapping, return the (possibly erroneous) type unchanged
|
||||
@ -1841,27 +1860,22 @@ public class Attr extends JCTree.Visitor {
|
||||
|
||||
//dup attribution environment and augment the set of inference variables
|
||||
Env<AttrContext> localEnv = env.dup(tree);
|
||||
localEnv.info.tvars = clazztype.tsym.type.getTypeArguments();
|
||||
|
||||
ClassType site = new ClassType(clazztype.getEnclosingType(),
|
||||
clazztype.tsym.type.getTypeArguments(),
|
||||
clazztype.tsym);
|
||||
|
||||
//if the type of the instance creation expression is a class type
|
||||
//apply method resolution inference (JLS 15.12.2.7). The return type
|
||||
//of the resolved constructor will be a partially instantiated type
|
||||
((ClassSymbol) clazztype.tsym).members_field = mapping.snd;
|
||||
Symbol constructor;
|
||||
try {
|
||||
constructor = rs.resolveDiamond(tree.pos(),
|
||||
Symbol constructor = rs.resolveDiamond(tree.pos(),
|
||||
localEnv,
|
||||
clazztype,
|
||||
site,
|
||||
argtypes,
|
||||
typeargtypes);
|
||||
} finally {
|
||||
((ClassSymbol) clazztype.tsym).members_field = mapping.fst;
|
||||
}
|
||||
|
||||
if (constructor.kind == MTH) {
|
||||
ClassType ct = new ClassType(clazztype.getEnclosingType(),
|
||||
clazztype.tsym.type.getTypeArguments(),
|
||||
clazztype.tsym);
|
||||
clazztype = checkMethod(ct,
|
||||
clazztype = checkMethod(site,
|
||||
constructor,
|
||||
localEnv,
|
||||
tree.args,
|
||||
@ -1872,13 +1886,13 @@ public class Attr extends JCTree.Visitor {
|
||||
clazztype = syms.errType;
|
||||
}
|
||||
|
||||
if (clazztype.tag == FORALL && !pt.isErroneous()) {
|
||||
if (clazztype.tag == FORALL && !pt().isErroneous()) {
|
||||
//if the resolved constructor's return type has some uninferred
|
||||
//type-variables, infer them using the expected type and declared
|
||||
//bounds (JLS 15.12.2.8).
|
||||
try {
|
||||
clazztype = infer.instantiateExpr((ForAll) clazztype,
|
||||
pt.tag == NONE ? syms.objectType : pt,
|
||||
pt().tag == NONE ? syms.objectType : pt(),
|
||||
Warner.noWarnings);
|
||||
} catch (Infer.InferenceException ex) {
|
||||
//an error occurred while inferring uninstantiated type-variables
|
||||
@ -1893,42 +1907,6 @@ public class Attr extends JCTree.Visitor {
|
||||
true);
|
||||
}
|
||||
|
||||
/** Creates a synthetic scope containing fake generic constructors.
|
||||
* Assuming that the original scope contains a constructor of the kind:
|
||||
* Foo(X x, Y y), where X,Y are class type-variables declared in Foo,
|
||||
* the synthetic scope is added a generic constructor of the kind:
|
||||
* <X,Y>Foo<X,Y>(X x, Y y). This is crucial in order to enable diamond
|
||||
* inference. The inferred return type of the synthetic constructor IS
|
||||
* the inferred type for the diamond operator.
|
||||
*/
|
||||
private Pair<Scope, Scope> getSyntheticScopeMapping(Type ctype) {
|
||||
if (ctype.tag != CLASS) {
|
||||
return erroneousMapping;
|
||||
}
|
||||
|
||||
Pair<Scope, Scope> mapping =
|
||||
new Pair<Scope, Scope>(ctype.tsym.members(), new Scope(ctype.tsym));
|
||||
|
||||
//for each constructor in the original scope, create a synthetic constructor
|
||||
//whose return type is the type of the class in which the constructor is
|
||||
//declared, and insert it into the new scope.
|
||||
for (Scope.Entry e = mapping.fst.lookup(names.init);
|
||||
e.scope != null;
|
||||
e = e.next()) {
|
||||
Type synthRestype = new ClassType(ctype.getEnclosingType(),
|
||||
ctype.tsym.type.getTypeArguments(),
|
||||
ctype.tsym);
|
||||
MethodSymbol synhConstr = new MethodSymbol(e.sym.flags(),
|
||||
names.init,
|
||||
types.createMethodTypeWithReturn(e.sym.type, synthRestype),
|
||||
e.sym.owner);
|
||||
mapping.snd.enter(synhConstr);
|
||||
}
|
||||
return mapping;
|
||||
}
|
||||
|
||||
private final Pair<Scope,Scope> erroneousMapping = new Pair<Scope,Scope>(null, null);
|
||||
|
||||
/** Make an attributed null check tree.
|
||||
*/
|
||||
public JCExpression makeNullCheck(JCExpression arg) {
|
||||
@ -1957,14 +1935,14 @@ public class Attr extends JCTree.Visitor {
|
||||
} else {
|
||||
// we are seeing an untyped aggregate { ... }
|
||||
// this is allowed only if the prototype is an array
|
||||
if (pt.tag == ARRAY) {
|
||||
elemtype = types.elemtype(pt);
|
||||
if (pt().tag == ARRAY) {
|
||||
elemtype = types.elemtype(pt());
|
||||
} else {
|
||||
if (pt.tag != ERROR) {
|
||||
if (pt().tag != ERROR) {
|
||||
log.error(tree.pos(), "illegal.initializer.for.type",
|
||||
pt);
|
||||
pt());
|
||||
}
|
||||
elemtype = types.createErrorType(pt);
|
||||
elemtype = types.createErrorType(pt());
|
||||
}
|
||||
}
|
||||
if (tree.elems != null) {
|
||||
@ -1973,7 +1951,7 @@ public class Attr extends JCTree.Visitor {
|
||||
}
|
||||
if (!types.isReifiable(elemtype))
|
||||
log.error(tree.pos(), "generic.array.creation");
|
||||
result = check(tree, owntype, VAL, pkind, pt);
|
||||
result = check(tree, owntype, VAL, resultInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -1987,23 +1965,23 @@ public class Attr extends JCTree.Visitor {
|
||||
}
|
||||
|
||||
public void visitParens(JCParens tree) {
|
||||
Type owntype = attribTree(tree.expr, env, pkind, pt);
|
||||
result = check(tree, owntype, pkind, pkind, pt);
|
||||
Type owntype = attribTree(tree.expr, env, resultInfo);
|
||||
result = check(tree, owntype, pkind(), resultInfo);
|
||||
Symbol sym = TreeInfo.symbol(tree);
|
||||
if (sym != null && (sym.kind&(TYP|PCK)) != 0)
|
||||
log.error(tree.pos(), "illegal.start.of.type");
|
||||
}
|
||||
|
||||
public void visitAssign(JCAssign tree) {
|
||||
Type owntype = attribTree(tree.lhs, env.dup(tree), VAR, Type.noType);
|
||||
Type owntype = attribTree(tree.lhs, env.dup(tree), varInfo);
|
||||
Type capturedType = capture(owntype);
|
||||
attribExpr(tree.rhs, env, owntype);
|
||||
result = check(tree, capturedType, VAL, pkind, pt);
|
||||
result = check(tree, capturedType, VAL, resultInfo);
|
||||
}
|
||||
|
||||
public void visitAssignop(JCAssignOp tree) {
|
||||
// Attribute arguments.
|
||||
Type owntype = attribTree(tree.lhs, env, VAR, Type.noType);
|
||||
Type owntype = attribTree(tree.lhs, env, varInfo);
|
||||
Type operand = attribExpr(tree.rhs, env);
|
||||
// Find operator.
|
||||
Symbol operator = tree.operator = rs.resolveBinaryOperator(
|
||||
@ -2023,13 +2001,13 @@ public class Attr extends JCTree.Visitor {
|
||||
operator.type.getReturnType(),
|
||||
owntype);
|
||||
}
|
||||
result = check(tree, owntype, VAL, pkind, pt);
|
||||
result = check(tree, owntype, VAL, resultInfo);
|
||||
}
|
||||
|
||||
public void visitUnary(JCUnary tree) {
|
||||
// Attribute arguments.
|
||||
Type argtype = (tree.getTag().isIncOrDecUnaryOp())
|
||||
? attribTree(tree.arg, env, VAR, Type.noType)
|
||||
? attribTree(tree.arg, env, varInfo)
|
||||
: chk.checkNonVoid(tree.arg.pos(), attribExpr(tree.arg, env));
|
||||
|
||||
// Find operator.
|
||||
@ -2061,7 +2039,7 @@ public class Attr extends JCTree.Visitor {
|
||||
}
|
||||
}
|
||||
}
|
||||
result = check(tree, owntype, VAL, pkind, pt);
|
||||
result = check(tree, owntype, VAL, resultInfo);
|
||||
}
|
||||
|
||||
public void visitBinary(JCBinary tree) {
|
||||
@ -2114,7 +2092,7 @@ public class Attr extends JCTree.Visitor {
|
||||
|
||||
chk.checkDivZero(tree.rhs.pos(), operator, right);
|
||||
}
|
||||
result = check(tree, owntype, VAL, pkind, pt);
|
||||
result = check(tree, owntype, VAL, resultInfo);
|
||||
}
|
||||
|
||||
public void visitTypeCast(JCTypeCast tree) {
|
||||
@ -2127,7 +2105,7 @@ public class Attr extends JCTree.Visitor {
|
||||
Type owntype = chk.checkCastable(tree.expr.pos(), exprtype, clazztype);
|
||||
if (exprtype.constValue() != null)
|
||||
owntype = cfolder.coerce(exprtype, owntype);
|
||||
result = check(tree, capture(owntype), VAL, pkind, pt);
|
||||
result = check(tree, capture(owntype), VAL, resultInfo);
|
||||
}
|
||||
|
||||
public void visitTypeTest(JCInstanceOf tree) {
|
||||
@ -2137,7 +2115,7 @@ public class Attr extends JCTree.Visitor {
|
||||
tree.clazz.pos(), attribType(tree.clazz, env));
|
||||
chk.validate(tree.clazz, env, false);
|
||||
chk.checkCastable(tree.expr.pos(), exprtype, clazztype);
|
||||
result = check(tree, syms.booleanType, VAL, pkind, pt);
|
||||
result = check(tree, syms.booleanType, VAL, resultInfo);
|
||||
}
|
||||
|
||||
public void visitIndexed(JCArrayAccess tree) {
|
||||
@ -2148,8 +2126,8 @@ public class Attr extends JCTree.Visitor {
|
||||
owntype = types.elemtype(atype);
|
||||
else if (atype.tag != ERROR)
|
||||
log.error(tree.pos(), "array.req.but.found", atype);
|
||||
if ((pkind & VAR) == 0) owntype = capture(owntype);
|
||||
result = check(tree, owntype, VAR, pkind, pt);
|
||||
if ((pkind() & VAR) == 0) owntype = capture(owntype);
|
||||
result = check(tree, owntype, VAR, resultInfo);
|
||||
}
|
||||
|
||||
public void visitIdent(JCIdent tree) {
|
||||
@ -2157,16 +2135,16 @@ public class Attr extends JCTree.Visitor {
|
||||
boolean varArgs = false;
|
||||
|
||||
// Find symbol
|
||||
if (pt.tag == METHOD || pt.tag == FORALL) {
|
||||
if (pt().tag == METHOD || pt().tag == FORALL) {
|
||||
// If we are looking for a method, the prototype `pt' will be a
|
||||
// method type with the type of the call's arguments as parameters.
|
||||
env.info.varArgs = false;
|
||||
sym = rs.resolveMethod(tree.pos(), env, tree.name, pt.getParameterTypes(), pt.getTypeArguments());
|
||||
sym = rs.resolveMethod(tree.pos(), env, tree.name, pt().getParameterTypes(), pt().getTypeArguments());
|
||||
varArgs = env.info.varArgs;
|
||||
} else if (tree.sym != null && tree.sym.kind != VAR) {
|
||||
sym = tree.sym;
|
||||
} else {
|
||||
sym = rs.resolveIdent(tree.pos(), env, tree.name, pkind);
|
||||
sym = rs.resolveIdent(tree.pos(), env, tree.name, pkind());
|
||||
}
|
||||
tree.sym = sym;
|
||||
|
||||
@ -2213,7 +2191,7 @@ public class Attr extends JCTree.Visitor {
|
||||
|
||||
// If we are expecting a variable (as opposed to a value), check
|
||||
// that the variable is assignable in the current environment.
|
||||
if (pkind == VAR)
|
||||
if (pkind() == VAR)
|
||||
checkAssignable(tree.pos(), v, null, env);
|
||||
}
|
||||
|
||||
@ -2234,7 +2212,7 @@ public class Attr extends JCTree.Visitor {
|
||||
while (env1.outer != null && !rs.isAccessible(env, env1.enclClass.sym.type, sym))
|
||||
env1 = env1.outer;
|
||||
}
|
||||
result = checkId(tree, env1.enclClass.sym.type, sym, env, pkind, pt, varArgs);
|
||||
result = checkId(tree, env1.enclClass.sym.type, sym, env, resultInfo, varArgs);
|
||||
}
|
||||
|
||||
public void visitSelect(JCFieldAccess tree) {
|
||||
@ -2245,14 +2223,14 @@ public class Attr extends JCTree.Visitor {
|
||||
{
|
||||
skind = TYP;
|
||||
} else {
|
||||
if ((pkind & PCK) != 0) skind = skind | PCK;
|
||||
if ((pkind & TYP) != 0) skind = skind | TYP | PCK;
|
||||
if ((pkind & (VAL | MTH)) != 0) skind = skind | VAL | TYP;
|
||||
if ((pkind() & PCK) != 0) skind = skind | PCK;
|
||||
if ((pkind() & TYP) != 0) skind = skind | TYP | PCK;
|
||||
if ((pkind() & (VAL | MTH)) != 0) skind = skind | VAL | TYP;
|
||||
}
|
||||
|
||||
// Attribute the qualifier expression, and determine its symbol (if any).
|
||||
Type site = attribTree(tree.selected, env, skind, Infer.anyPoly);
|
||||
if ((pkind & (PCK | TYP)) == 0)
|
||||
Type site = attribTree(tree.selected, env, new ResultInfo(skind, Infer.anyPoly));
|
||||
if ((pkind() & (PCK | TYP)) == 0)
|
||||
site = capture(site); // Capture field access
|
||||
|
||||
// don't allow T.class T[].class, etc
|
||||
@ -2287,10 +2265,10 @@ public class Attr extends JCTree.Visitor {
|
||||
|
||||
// Determine the symbol represented by the selection.
|
||||
env.info.varArgs = false;
|
||||
Symbol sym = selectSym(tree, sitesym, site, env, pt, pkind);
|
||||
if (sym.exists() && !isType(sym) && (pkind & (PCK | TYP)) != 0) {
|
||||
Symbol sym = selectSym(tree, sitesym, site, env, resultInfo);
|
||||
if (sym.exists() && !isType(sym) && (pkind() & (PCK | TYP)) != 0) {
|
||||
site = capture(site);
|
||||
sym = selectSym(tree, sitesym, site, env, pt, pkind);
|
||||
sym = selectSym(tree, sitesym, site, env, resultInfo);
|
||||
}
|
||||
boolean varArgs = env.info.varArgs;
|
||||
tree.sym = sym;
|
||||
@ -2310,7 +2288,7 @@ public class Attr extends JCTree.Visitor {
|
||||
|
||||
// If we are expecting a variable (as opposed to a value), check
|
||||
// that the variable is assignable in the current environment.
|
||||
if (pkind == VAR)
|
||||
if (pkind() == VAR)
|
||||
checkAssignable(tree.pos(), v, tree.selected, env);
|
||||
}
|
||||
|
||||
@ -2326,8 +2304,8 @@ public class Attr extends JCTree.Visitor {
|
||||
|
||||
// Disallow selecting a type from an expression
|
||||
if (isType(sym) && (sitesym==null || (sitesym.kind&(TYP|PCK)) == 0)) {
|
||||
tree.type = check(tree.selected, pt,
|
||||
sitesym == null ? VAL : sitesym.kind, TYP|PCK, pt);
|
||||
tree.type = check(tree.selected, pt(),
|
||||
sitesym == null ? VAL : sitesym.kind, new ResultInfo(TYP|PCK, pt()));
|
||||
}
|
||||
|
||||
if (isType(sitesym)) {
|
||||
@ -2367,7 +2345,7 @@ public class Attr extends JCTree.Visitor {
|
||||
}
|
||||
|
||||
env.info.selectSuper = selectSuperPrev;
|
||||
result = checkId(tree, site, sym, env, pkind, pt, varArgs);
|
||||
result = checkId(tree, site, sym, env, resultInfo, varArgs);
|
||||
env.info.tvars = List.nil();
|
||||
}
|
||||
//where
|
||||
@ -2376,34 +2354,25 @@ public class Attr extends JCTree.Visitor {
|
||||
* @param tree The select tree.
|
||||
* @param site The type of the selected expression,
|
||||
* @param env The current environment.
|
||||
* @param pt The current prototype.
|
||||
* @param pkind The expected kind(s) of the Select expression.
|
||||
* @param resultInfo The current result.
|
||||
*/
|
||||
private Symbol selectSym(JCFieldAccess tree,
|
||||
Type site,
|
||||
Env<AttrContext> env,
|
||||
Type pt,
|
||||
int pkind) {
|
||||
return selectSym(tree, site.tsym, site, env, pt, pkind);
|
||||
}
|
||||
private Symbol selectSym(JCFieldAccess tree,
|
||||
Symbol location,
|
||||
Type site,
|
||||
Env<AttrContext> env,
|
||||
Type pt,
|
||||
int pkind) {
|
||||
ResultInfo resultInfo) {
|
||||
DiagnosticPosition pos = tree.pos();
|
||||
Name name = tree.name;
|
||||
switch (site.tag) {
|
||||
case PACKAGE:
|
||||
return rs.access(
|
||||
rs.findIdentInPackage(env, site.tsym, name, pkind),
|
||||
rs.findIdentInPackage(env, site.tsym, name, resultInfo.pkind),
|
||||
pos, location, site, name, true);
|
||||
case ARRAY:
|
||||
case CLASS:
|
||||
if (pt.tag == METHOD || pt.tag == FORALL) {
|
||||
if (resultInfo.pt.tag == METHOD || resultInfo.pt.tag == FORALL) {
|
||||
return rs.resolveQualifiedMethod(
|
||||
pos, env, location, site, name, pt.getParameterTypes(), pt.getTypeArguments());
|
||||
pos, env, location, site, name, resultInfo.pt.getParameterTypes(), resultInfo.pt.getTypeArguments());
|
||||
} else if (name == names._this || name == names._super) {
|
||||
return rs.resolveSelf(pos, env, site.tsym, name);
|
||||
} else if (name == names._class) {
|
||||
@ -2418,8 +2387,8 @@ public class Attr extends JCTree.Visitor {
|
||||
STATIC | PUBLIC | FINAL, names._class, t, site.tsym);
|
||||
} else {
|
||||
// We are seeing a plain identifier as selector.
|
||||
Symbol sym = rs.findIdentInType(env, site, name, pkind);
|
||||
if ((pkind & ERRONEOUS) == 0)
|
||||
Symbol sym = rs.findIdentInType(env, site, name, resultInfo.pkind);
|
||||
if ((resultInfo.pkind & ERRONEOUS) == 0)
|
||||
sym = rs.access(sym, pos, location, site, name, true);
|
||||
return sym;
|
||||
}
|
||||
@ -2433,7 +2402,7 @@ public class Attr extends JCTree.Visitor {
|
||||
// other words, we are seeing this illegal program:
|
||||
// class B<T> extends A<T.foo> {}
|
||||
Symbol sym = (site.getUpperBound() != null)
|
||||
? selectSym(tree, location, capture(site.getUpperBound()), env, pt, pkind)
|
||||
? selectSym(tree, location, capture(site.getUpperBound()), env, resultInfo)
|
||||
: null;
|
||||
if (sym == null) {
|
||||
log.error(pos, "type.var.cant.be.deref");
|
||||
@ -2487,17 +2456,15 @@ public class Attr extends JCTree.Visitor {
|
||||
* expression, otherwise the type of the current class.
|
||||
* @param sym The symbol representing the identifier.
|
||||
* @param env The current environment.
|
||||
* @param pkind The set of expected kinds.
|
||||
* @param pt The expected type.
|
||||
* @param resultInfo The expected result
|
||||
*/
|
||||
Type checkId(JCTree tree,
|
||||
Type site,
|
||||
Symbol sym,
|
||||
Env<AttrContext> env,
|
||||
int pkind,
|
||||
Type pt,
|
||||
ResultInfo resultInfo,
|
||||
boolean useVarargs) {
|
||||
if (pt.isErroneous()) return types.createErrorType(site);
|
||||
if (resultInfo.pt.isErroneous()) return types.createErrorType(site);
|
||||
Type owntype; // The computed type of this identifier occurrence.
|
||||
switch (sym.kind) {
|
||||
case TYP:
|
||||
@ -2542,7 +2509,7 @@ public class Attr extends JCTree.Visitor {
|
||||
// which is being assigned to, issue an unchecked warning if
|
||||
// its type changes under erasure.
|
||||
if (allowGenerics &&
|
||||
pkind == VAR &&
|
||||
resultInfo.pkind == VAR &&
|
||||
v.owner.kind == TYP &&
|
||||
(v.flags() & STATIC) == 0 &&
|
||||
(site.tag == CLASS || site.tag == TYPEVAR)) {
|
||||
@ -2577,14 +2544,14 @@ public class Attr extends JCTree.Visitor {
|
||||
if (v.getConstValue() != null && isStaticReference(tree))
|
||||
owntype = owntype.constType(v.getConstValue());
|
||||
|
||||
if (pkind == VAL) {
|
||||
if (resultInfo.pkind == VAL) {
|
||||
owntype = capture(owntype); // capture "names as expressions"
|
||||
}
|
||||
break;
|
||||
case MTH: {
|
||||
JCMethodInvocation app = (JCMethodInvocation)env.tree;
|
||||
owntype = checkMethod(site, sym, env, app.args,
|
||||
pt.getParameterTypes(), pt.getTypeArguments(),
|
||||
resultInfo.pt.getParameterTypes(), resultInfo.pt.getTypeArguments(),
|
||||
env.info.varArgs);
|
||||
break;
|
||||
}
|
||||
@ -2607,7 +2574,7 @@ public class Attr extends JCTree.Visitor {
|
||||
|
||||
// Test (3): if symbol is a variable, check that its type and
|
||||
// kind are compatible with the prototype and protokind.
|
||||
return check(tree, owntype, sym.kind, pkind, pt);
|
||||
return check(tree, owntype, sym.kind, resultInfo);
|
||||
}
|
||||
|
||||
/** Check that variable is initialized and evaluate the variable's
|
||||
@ -2720,7 +2687,7 @@ public class Attr extends JCTree.Visitor {
|
||||
Warner noteWarner = new Warner();
|
||||
|
||||
/**
|
||||
* Check that method arguments conform to its instantation.
|
||||
* Check that method arguments conform to its instantiation.
|
||||
**/
|
||||
public Type checkMethod(Type site,
|
||||
Symbol sym,
|
||||
@ -2757,112 +2724,44 @@ public class Attr extends JCTree.Visitor {
|
||||
true,
|
||||
useVarargs,
|
||||
noteWarner);
|
||||
boolean warned = noteWarner.hasNonSilentLint(LintCategory.UNCHECKED);
|
||||
|
||||
boolean unchecked = noteWarner.hasNonSilentLint(LintCategory.UNCHECKED);
|
||||
|
||||
// If this fails, something went wrong; we should not have
|
||||
// found the identifier in the first place.
|
||||
if (owntype == null) {
|
||||
if (!pt.isErroneous())
|
||||
if (!pt().isErroneous())
|
||||
log.error(env.tree.pos(),
|
||||
"internal.error.cant.instantiate",
|
||||
sym, site,
|
||||
Type.toString(pt.getParameterTypes()));
|
||||
"internal.error.cant.instantiate",
|
||||
sym, site,
|
||||
Type.toString(pt().getParameterTypes()));
|
||||
owntype = types.createErrorType(site);
|
||||
return types.createErrorType(site);
|
||||
} else if (owntype.getReturnType().tag == FORALL && !unchecked) {
|
||||
return owntype;
|
||||
} else {
|
||||
// System.out.println("call : " + env.tree);
|
||||
// System.out.println("method : " + owntype);
|
||||
// System.out.println("actuals: " + argtypes);
|
||||
List<Type> formals = owntype.getParameterTypes();
|
||||
Type last = useVarargs ? formals.last() : null;
|
||||
if (sym.name==names.init &&
|
||||
sym.owner == syms.enumSym)
|
||||
formals = formals.tail.tail;
|
||||
List<JCExpression> args = argtrees;
|
||||
while (formals.head != last) {
|
||||
JCTree arg = args.head;
|
||||
Warner warn = chk.convertWarner(arg.pos(), arg.type, formals.head);
|
||||
assertConvertible(arg, arg.type, formals.head, warn);
|
||||
warned |= warn.hasNonSilentLint(LintCategory.UNCHECKED);
|
||||
args = args.tail;
|
||||
formals = formals.tail;
|
||||
}
|
||||
if (useVarargs) {
|
||||
Type varArg = types.elemtype(last);
|
||||
while (args.tail != null) {
|
||||
JCTree arg = args.head;
|
||||
Warner warn = chk.convertWarner(arg.pos(), arg.type, varArg);
|
||||
assertConvertible(arg, arg.type, varArg, warn);
|
||||
warned |= warn.hasNonSilentLint(LintCategory.UNCHECKED);
|
||||
args = args.tail;
|
||||
}
|
||||
} else if ((sym.flags() & VARARGS) != 0 && allowVarargs) {
|
||||
// non-varargs call to varargs method
|
||||
Type varParam = owntype.getParameterTypes().last();
|
||||
Type lastArg = argtypes.last();
|
||||
if (types.isSubtypeUnchecked(lastArg, types.elemtype(varParam)) &&
|
||||
!types.isSameType(types.erasure(varParam), types.erasure(lastArg)))
|
||||
log.warning(argtrees.last().pos(), "inexact.non-varargs.call",
|
||||
types.elemtype(varParam),
|
||||
varParam);
|
||||
}
|
||||
|
||||
if (warned && sym.type.tag == FORALL) {
|
||||
chk.warnUnchecked(env.tree.pos(),
|
||||
"unchecked.meth.invocation.applied",
|
||||
kindName(sym),
|
||||
sym.name,
|
||||
rs.methodArguments(sym.type.getParameterTypes()),
|
||||
rs.methodArguments(argtypes),
|
||||
kindName(sym.location()),
|
||||
sym.location());
|
||||
owntype = new MethodType(owntype.getParameterTypes(),
|
||||
types.erasure(owntype.getReturnType()),
|
||||
types.erasure(owntype.getThrownTypes()),
|
||||
syms.methodClass);
|
||||
}
|
||||
if (useVarargs) {
|
||||
JCTree tree = env.tree;
|
||||
Type argtype = owntype.getParameterTypes().last();
|
||||
if (owntype.getReturnType().tag != FORALL || warned) {
|
||||
chk.checkVararg(env.tree.pos(), owntype.getParameterTypes(), sym);
|
||||
}
|
||||
Type elemtype = types.elemtype(argtype);
|
||||
switch (tree.getTag()) {
|
||||
case APPLY:
|
||||
((JCMethodInvocation) tree).varargsElement = elemtype;
|
||||
break;
|
||||
case NEWCLASS:
|
||||
((JCNewClass) tree).varargsElement = elemtype;
|
||||
break;
|
||||
default:
|
||||
throw new AssertionError(""+tree);
|
||||
}
|
||||
}
|
||||
return chk.checkMethod(owntype, sym, env, argtrees, argtypes, useVarargs, unchecked);
|
||||
}
|
||||
return owntype;
|
||||
}
|
||||
|
||||
private void assertConvertible(JCTree tree, Type actual, Type formal, Warner warn) {
|
||||
if (types.isConvertible(actual, formal, warn))
|
||||
return;
|
||||
|
||||
if (formal.isCompound()
|
||||
&& types.isSubtype(actual, types.supertype(formal))
|
||||
&& types.isSubtypeUnchecked(actual, types.interfaces(formal), warn))
|
||||
return;
|
||||
|
||||
if (false) {
|
||||
// TODO: make assertConvertible work
|
||||
chk.typeError(tree.pos(), diags.fragment("incompatible.types"), actual, formal);
|
||||
throw new AssertionError("Tree: " + tree
|
||||
+ " actual:" + actual
|
||||
+ " formal: " + formal);
|
||||
}
|
||||
/**
|
||||
* Check that constructor arguments conform to its instantiation.
|
||||
**/
|
||||
public Type checkConstructor(Type site,
|
||||
Symbol sym,
|
||||
Env<AttrContext> env,
|
||||
final List<JCExpression> argtrees,
|
||||
List<Type> argtypes,
|
||||
List<Type> typeargtypes,
|
||||
boolean useVarargs) {
|
||||
Type owntype = checkMethod(site, sym, env, argtrees, argtypes, typeargtypes, useVarargs);
|
||||
chk.checkType(env.tree.pos(), owntype.getReturnType(), syms.voidType);
|
||||
return owntype;
|
||||
}
|
||||
|
||||
public void visitLiteral(JCLiteral tree) {
|
||||
result = check(
|
||||
tree, litType(tree.typetag).constType(tree.value), VAL, pkind, pt);
|
||||
tree, litType(tree.typetag).constType(tree.value), VAL, resultInfo);
|
||||
}
|
||||
//where
|
||||
/** Return the type of a literal with given type tag.
|
||||
@ -2872,13 +2771,13 @@ public class Attr extends JCTree.Visitor {
|
||||
}
|
||||
|
||||
public void visitTypeIdent(JCPrimitiveTypeTree tree) {
|
||||
result = check(tree, syms.typeOfTag[tree.typetag], TYP, pkind, pt);
|
||||
result = check(tree, syms.typeOfTag[tree.typetag], TYP, resultInfo);
|
||||
}
|
||||
|
||||
public void visitTypeArray(JCArrayTypeTree tree) {
|
||||
Type etype = attribType(tree.elemtype, env);
|
||||
Type type = new ArrayType(etype, syms.arrayClass);
|
||||
result = check(tree, type, TYP, pkind, pt);
|
||||
result = check(tree, type, TYP, resultInfo);
|
||||
}
|
||||
|
||||
/** Visitor method for parameterized types.
|
||||
@ -2936,7 +2835,7 @@ public class Attr extends JCTree.Visitor {
|
||||
owntype = types.createErrorType(tree.type);
|
||||
}
|
||||
}
|
||||
result = check(tree, owntype, TYP, pkind, pt);
|
||||
result = check(tree, owntype, TYP, resultInfo);
|
||||
}
|
||||
|
||||
public void visitTypeUnion(JCTypeUnion tree) {
|
||||
@ -2973,7 +2872,7 @@ public class Attr extends JCTree.Visitor {
|
||||
all_multicatchTypes.append(ctype);
|
||||
}
|
||||
}
|
||||
Type t = check(tree, types.lub(multicatchTypes.toList()), TYP, pkind, pt);
|
||||
Type t = check(tree, types.lub(multicatchTypes.toList()), TYP, resultInfo);
|
||||
if (t.tag == CLASS) {
|
||||
List<Type> alternatives =
|
||||
((all_multicatchTypes == null) ? multicatchTypes : all_multicatchTypes).toList();
|
||||
@ -3059,18 +2958,18 @@ public class Attr extends JCTree.Visitor {
|
||||
result = check(tree, new WildcardType(chk.checkRefType(tree.pos(), type),
|
||||
tree.kind.kind,
|
||||
syms.boundClass),
|
||||
TYP, pkind, pt);
|
||||
TYP, resultInfo);
|
||||
}
|
||||
|
||||
public void visitAnnotation(JCAnnotation tree) {
|
||||
log.error(tree.pos(), "annotation.not.valid.for.type", pt);
|
||||
log.error(tree.pos(), "annotation.not.valid.for.type", pt());
|
||||
result = tree.type = syms.errType;
|
||||
}
|
||||
|
||||
public void visitErroneous(JCErroneous tree) {
|
||||
if (tree.errs != null)
|
||||
for (JCTree err : tree.errs)
|
||||
attribTree(err, env, ERR, pt);
|
||||
attribTree(err, env, new ResultInfo(ERR, pt()));
|
||||
result = tree.type = syms.errType;
|
||||
}
|
||||
|
||||
|
||||
@ -63,6 +63,7 @@ public class Check {
|
||||
|
||||
private final Names names;
|
||||
private final Log log;
|
||||
private final Resolve rs;
|
||||
private final Symtab syms;
|
||||
private final Enter enter;
|
||||
private final Infer infer;
|
||||
@ -95,6 +96,7 @@ public class Check {
|
||||
|
||||
names = Names.instance(context);
|
||||
log = Log.instance(context);
|
||||
rs = Resolve.instance(context);
|
||||
syms = Symtab.instance(context);
|
||||
enter = Enter.instance(context);
|
||||
infer = Infer.instance(context);
|
||||
@ -106,6 +108,7 @@ public class Check {
|
||||
|
||||
Source source = Source.instance(context);
|
||||
allowGenerics = source.allowGenerics();
|
||||
allowVarargs = source.allowVarargs();
|
||||
allowAnnotations = source.allowAnnotations();
|
||||
allowCovariantReturns = source.allowCovariantReturns();
|
||||
allowSimplifiedVarargs = source.allowSimplifiedVarargs();
|
||||
@ -137,6 +140,10 @@ public class Check {
|
||||
*/
|
||||
boolean allowGenerics;
|
||||
|
||||
/** Switch: varargs enabled?
|
||||
*/
|
||||
boolean allowVarargs;
|
||||
|
||||
/** Switch: annotations enabled?
|
||||
*/
|
||||
boolean allowAnnotations;
|
||||
@ -525,16 +532,16 @@ public class Check {
|
||||
* @param a The type that should be bounded by bs.
|
||||
* @param bs The bound.
|
||||
*/
|
||||
private boolean checkExtends(Type a, TypeVar bs) {
|
||||
private boolean checkExtends(Type a, Type bound) {
|
||||
if (a.isUnbound()) {
|
||||
return true;
|
||||
} else if (a.tag != WILDCARD) {
|
||||
a = types.upperBound(a);
|
||||
return types.isSubtype(a, bs.bound);
|
||||
return types.isSubtype(a, bound);
|
||||
} else if (a.isExtendsBound()) {
|
||||
return types.isCastable(bs.getUpperBound(), types.upperBound(a), Warner.noWarnings);
|
||||
return types.isCastable(bound, types.upperBound(a), Warner.noWarnings);
|
||||
} else if (a.isSuperBound()) {
|
||||
return !types.notSoftSubtype(types.lowerBound(a), bs.getUpperBound());
|
||||
return !types.notSoftSubtype(types.lowerBound(a), bound);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -743,22 +750,103 @@ public class Check {
|
||||
(s.flags() & (STATIC | FINAL)) != 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check that vararg method call is sound
|
||||
* @param pos Position to be used for error reporting.
|
||||
* @param argtypes Actual arguments supplied to vararg method.
|
||||
*/
|
||||
void checkVararg(DiagnosticPosition pos, List<Type> argtypes, Symbol msym) {
|
||||
Type argtype = argtypes.last();
|
||||
if (!types.isReifiable(argtype) &&
|
||||
(!allowSimplifiedVarargs ||
|
||||
msym.attribute(syms.trustMeType.tsym) == null ||
|
||||
!isTrustMeAllowedOnMethod(msym))) {
|
||||
warnUnchecked(pos,
|
||||
"unchecked.generic.array.creation",
|
||||
argtype);
|
||||
Type checkMethod(Type owntype,
|
||||
Symbol sym,
|
||||
Env<AttrContext> env,
|
||||
final List<JCExpression> argtrees,
|
||||
List<Type> argtypes,
|
||||
boolean useVarargs,
|
||||
boolean unchecked) {
|
||||
// System.out.println("call : " + env.tree);
|
||||
// System.out.println("method : " + owntype);
|
||||
// System.out.println("actuals: " + argtypes);
|
||||
List<Type> formals = owntype.getParameterTypes();
|
||||
Type last = useVarargs ? formals.last() : null;
|
||||
if (sym.name==names.init &&
|
||||
sym.owner == syms.enumSym)
|
||||
formals = formals.tail.tail;
|
||||
List<JCExpression> args = argtrees;
|
||||
while (formals.head != last) {
|
||||
JCTree arg = args.head;
|
||||
Warner warn = convertWarner(arg.pos(), arg.type, formals.head);
|
||||
assertConvertible(arg, arg.type, formals.head, warn);
|
||||
args = args.tail;
|
||||
formals = formals.tail;
|
||||
}
|
||||
if (useVarargs) {
|
||||
Type varArg = types.elemtype(last);
|
||||
while (args.tail != null) {
|
||||
JCTree arg = args.head;
|
||||
Warner warn = convertWarner(arg.pos(), arg.type, varArg);
|
||||
assertConvertible(arg, arg.type, varArg, warn);
|
||||
args = args.tail;
|
||||
}
|
||||
} else if ((sym.flags() & VARARGS) != 0 && allowVarargs) {
|
||||
// non-varargs call to varargs method
|
||||
Type varParam = owntype.getParameterTypes().last();
|
||||
Type lastArg = argtypes.last();
|
||||
if (types.isSubtypeUnchecked(lastArg, types.elemtype(varParam)) &&
|
||||
!types.isSameType(types.erasure(varParam), types.erasure(lastArg)))
|
||||
log.warning(argtrees.last().pos(), "inexact.non-varargs.call",
|
||||
types.elemtype(varParam), varParam);
|
||||
}
|
||||
if (unchecked) {
|
||||
warnUnchecked(env.tree.pos(),
|
||||
"unchecked.meth.invocation.applied",
|
||||
kindName(sym),
|
||||
sym.name,
|
||||
rs.methodArguments(sym.type.getParameterTypes()),
|
||||
rs.methodArguments(argtypes),
|
||||
kindName(sym.location()),
|
||||
sym.location());
|
||||
owntype = new MethodType(owntype.getParameterTypes(),
|
||||
types.erasure(owntype.getReturnType()),
|
||||
types.erasure(owntype.getThrownTypes()),
|
||||
syms.methodClass);
|
||||
}
|
||||
if (useVarargs) {
|
||||
JCTree tree = env.tree;
|
||||
Type argtype = owntype.getParameterTypes().last();
|
||||
if (!types.isReifiable(argtype) &&
|
||||
(!allowSimplifiedVarargs ||
|
||||
sym.attribute(syms.trustMeType.tsym) == null ||
|
||||
!isTrustMeAllowedOnMethod(sym))) {
|
||||
warnUnchecked(env.tree.pos(),
|
||||
"unchecked.generic.array.creation",
|
||||
argtype);
|
||||
}
|
||||
Type elemtype = types.elemtype(argtype);
|
||||
switch (tree.getTag()) {
|
||||
case APPLY:
|
||||
((JCMethodInvocation) tree).varargsElement = elemtype;
|
||||
break;
|
||||
case NEWCLASS:
|
||||
((JCNewClass) tree).varargsElement = elemtype;
|
||||
break;
|
||||
default:
|
||||
throw new AssertionError(""+tree);
|
||||
}
|
||||
}
|
||||
return owntype;
|
||||
}
|
||||
//where
|
||||
private void assertConvertible(JCTree tree, Type actual, Type formal, Warner warn) {
|
||||
if (types.isConvertible(actual, formal, warn))
|
||||
return;
|
||||
|
||||
if (formal.isCompound()
|
||||
&& types.isSubtype(actual, types.supertype(formal))
|
||||
&& types.isSubtypeUnchecked(actual, types.interfaces(formal), warn))
|
||||
return;
|
||||
|
||||
if (false) {
|
||||
// TODO: make assertConvertible work
|
||||
typeError(tree.pos(), diags.fragment("incompatible.types"), actual, formal);
|
||||
throw new AssertionError("Tree: " + tree
|
||||
+ " actual:" + actual
|
||||
+ " formal: " + formal);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check that type 't' is a valid instantiation of a generic class
|
||||
@ -776,18 +864,16 @@ public class Check {
|
||||
List<Type> actuals = type.allparams();
|
||||
List<Type> args = type.getTypeArguments();
|
||||
List<Type> forms = type.tsym.type.getTypeArguments();
|
||||
ListBuffer<Type> tvars_buf = new ListBuffer<Type>();
|
||||
ListBuffer<Type> bounds_buf = new ListBuffer<Type>();
|
||||
|
||||
// For matching pairs of actual argument types `a' and
|
||||
// formal type parameters with declared bound `b' ...
|
||||
while (args.nonEmpty() && forms.nonEmpty()) {
|
||||
// exact type arguments needs to know their
|
||||
// bounds (for upper and lower bound
|
||||
// calculations). So we create new TypeVars with
|
||||
// bounds substed with actuals.
|
||||
tvars_buf.append(types.substBound(((TypeVar)forms.head),
|
||||
formals,
|
||||
actuals));
|
||||
// calculations). So we create new bounds where
|
||||
// type-parameters are replaced with actuals argument types.
|
||||
bounds_buf.append(types.subst(forms.head.getUpperBound(), formals, actuals));
|
||||
args = args.tail;
|
||||
forms = forms.tail;
|
||||
}
|
||||
@ -804,32 +890,30 @@ public class Check {
|
||||
}
|
||||
|
||||
args = type.getTypeArguments();
|
||||
List<Type> tvars = tvars_buf.toList();
|
||||
List<Type> bounds = bounds_buf.toList();
|
||||
|
||||
while (args.nonEmpty() && tvars.nonEmpty()) {
|
||||
Type actual = types.subst(args.head,
|
||||
type.tsym.type.getTypeArguments(),
|
||||
tvars_buf.toList());
|
||||
while (args.nonEmpty() && bounds.nonEmpty()) {
|
||||
Type actual = args.head;
|
||||
if (!isTypeArgErroneous(actual) &&
|
||||
!tvars.head.getUpperBound().isErroneous() &&
|
||||
!checkExtends(actual, (TypeVar)tvars.head)) {
|
||||
!bounds.head.isErroneous() &&
|
||||
!checkExtends(actual, bounds.head)) {
|
||||
return args.head;
|
||||
}
|
||||
args = args.tail;
|
||||
tvars = tvars.tail;
|
||||
bounds = bounds.tail;
|
||||
}
|
||||
|
||||
args = type.getTypeArguments();
|
||||
tvars = tvars_buf.toList();
|
||||
bounds = bounds_buf.toList();
|
||||
|
||||
for (Type arg : types.capture(type).getTypeArguments()) {
|
||||
if (arg.tag == TYPEVAR &&
|
||||
arg.getUpperBound().isErroneous() &&
|
||||
!tvars.head.getUpperBound().isErroneous() &&
|
||||
!bounds.head.isErroneous() &&
|
||||
!isTypeArgErroneous(args.head)) {
|
||||
return args.head;
|
||||
}
|
||||
tvars = tvars.tail;
|
||||
bounds = bounds.tail;
|
||||
args = args.tail;
|
||||
}
|
||||
|
||||
@ -2492,7 +2576,7 @@ public class Check {
|
||||
if (enableSunApiLintControl)
|
||||
warnSunApi(pos, "sun.proprietary", s);
|
||||
else
|
||||
log.strictWarning(pos, "sun.proprietary", s);
|
||||
log.mandatoryWarning(pos, "sun.proprietary", s);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -385,7 +385,6 @@ public class Infer {
|
||||
final Warner warn) throws InferenceException {
|
||||
//-System.err.println("instantiateMethod(" + tvars + ", " + mt + ", " + argtypes + ")"); //DEBUG
|
||||
List<Type> undetvars = Type.map(tvars, fromTypeVarFun);
|
||||
//final List<Type> capturedArgs = types.capture(argtypes);
|
||||
|
||||
final List<Type> capturedArgs =
|
||||
rs.checkRawArgumentsAcceptable(env, undetvars, argtypes, mt.getParameterTypes(),
|
||||
@ -445,16 +444,20 @@ public class Infer {
|
||||
return List.nil();
|
||||
}
|
||||
@Override
|
||||
void check(List<Type> inferred, Types types) throws NoInstanceException {
|
||||
void instantiateReturnType(Type restype, List<Type> inferred, Types types) throws NoInstanceException {
|
||||
Type owntype = new MethodType(types.subst(getParameterTypes(), tvars, inferred),
|
||||
restype,
|
||||
types.subst(getThrownTypes(), tvars, inferred),
|
||||
qtype.tsym);
|
||||
// check that actuals conform to inferred formals
|
||||
checkArgumentsAcceptable(env, capturedArgs, getParameterTypes(), allowBoxing, useVarargs, warn);
|
||||
warn.clear();
|
||||
checkArgumentsAcceptable(env, capturedArgs, owntype.getParameterTypes(), allowBoxing, useVarargs, warn);
|
||||
// check that inferred bounds conform to their bounds
|
||||
checkWithinBounds(all_tvars,
|
||||
types.subst(inferredTypes, tvars, inferred), warn);
|
||||
if (useVarargs) {
|
||||
chk.checkVararg(env.tree.pos(), getParameterTypes(), msym);
|
||||
}
|
||||
}};
|
||||
qtype = chk.checkMethod(owntype, msym, env, TreeInfo.args(env.tree), capturedArgs, useVarargs, warn.hasNonSilentLint(Lint.LintCategory.UNCHECKED));
|
||||
}
|
||||
};
|
||||
}
|
||||
else {
|
||||
// check that actuals conform to inferred formals
|
||||
@ -520,16 +523,7 @@ public class Infer {
|
||||
return qtype.map(f);
|
||||
}
|
||||
|
||||
void instantiateReturnType(Type restype, List<Type> inferred, Types types) throws NoInstanceException {
|
||||
//update method type with newly inferred type-arguments
|
||||
qtype = new MethodType(types.subst(getParameterTypes(), tvars, inferred),
|
||||
restype,
|
||||
types.subst(UninferredMethodType.this.getThrownTypes(), tvars, inferred),
|
||||
UninferredMethodType.this.qtype.tsym);
|
||||
check(inferred, types);
|
||||
}
|
||||
|
||||
abstract void check(List<Type> inferred, Types types) throws NoInstanceException;
|
||||
abstract void instantiateReturnType(Type restype, List<Type> inferred, Types types);
|
||||
|
||||
abstract List<Type> getConstraints(TypeVar tv, ConstraintKind ck);
|
||||
|
||||
@ -544,7 +538,7 @@ public class Infer {
|
||||
if (rs.verboseResolutionMode.contains(VerboseResolutionMode.DEFERRED_INST)) {
|
||||
log.note(pos, "deferred.method.inst", msym, UninferredMethodType.this.qtype, newRestype);
|
||||
}
|
||||
return newRestype;
|
||||
return UninferredMethodType.this.qtype.getReturnType();
|
||||
}
|
||||
@Override
|
||||
public List<Type> getConstraints(TypeVar tv, ConstraintKind ck) {
|
||||
|
||||
@ -529,24 +529,17 @@ public class MemberEnter extends JCTree.Visitor implements Completer {
|
||||
|
||||
// process the non-static imports and the static imports of types.
|
||||
public void visitImport(JCImport tree) {
|
||||
JCTree imp = tree.qualid;
|
||||
JCFieldAccess imp = (JCFieldAccess)tree.qualid;
|
||||
Name name = TreeInfo.name(imp);
|
||||
TypeSymbol p;
|
||||
|
||||
// Create a local environment pointing to this tree to disable
|
||||
// effects of other imports in Resolve.findGlobalType
|
||||
Env<AttrContext> localEnv = env.dup(tree);
|
||||
|
||||
// Attribute qualifying package or class.
|
||||
JCFieldAccess s = (JCFieldAccess) imp;
|
||||
p = attr.
|
||||
attribTree(s.selected,
|
||||
localEnv,
|
||||
tree.staticImport ? TYP : (TYP | PCK),
|
||||
Type.noType).tsym;
|
||||
TypeSymbol p = attr.attribImportQualifier(tree, localEnv).tsym;
|
||||
if (name == names.asterisk) {
|
||||
// Import on demand.
|
||||
chk.checkCanonical(s.selected);
|
||||
chk.checkCanonical(imp.selected);
|
||||
if (tree.staticImport)
|
||||
importStaticAll(tree.pos, p, env);
|
||||
else
|
||||
@ -555,7 +548,7 @@ public class MemberEnter extends JCTree.Visitor implements Completer {
|
||||
// Named type import.
|
||||
if (tree.staticImport) {
|
||||
importNamedStatic(tree.pos(), p, name, localEnv);
|
||||
chk.checkCanonical(s.selected);
|
||||
chk.checkCanonical(imp.selected);
|
||||
} else {
|
||||
TypeSymbol c = attribImportType(imp, localEnv).tsym;
|
||||
chk.checkCanonical(imp);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -107,7 +107,7 @@ public class TransTypes extends TreeTranslator {
|
||||
make.at(tree.pos);
|
||||
if (!types.isSameType(tree.type, target)) {
|
||||
if (!resolve.isAccessible(env, target.tsym))
|
||||
resolve.logAccessError(env, tree, target);
|
||||
resolve.logAccessErrorInternal(env, tree, target);
|
||||
tree = make.TypeCast(make.Type(target), tree).setType(target);
|
||||
}
|
||||
make.pos = oldpos;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2012, 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
|
||||
@ -102,6 +102,16 @@ public class TreeInfo {
|
||||
setOpname(MOD, "%", names);
|
||||
}
|
||||
|
||||
public static List<JCExpression> args(JCTree t) {
|
||||
switch (t.getTag()) {
|
||||
case APPLY:
|
||||
return ((JCMethodInvocation)t).args;
|
||||
case NEWCLASS:
|
||||
return ((JCNewClass)t).args;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/** Return name of operator with given tree tag.
|
||||
*/
|
||||
|
||||
@ -36,6 +36,14 @@ ifeq ($(OSNAME), Linux)
|
||||
ARCH=i586
|
||||
endif
|
||||
endif
|
||||
ifeq ($(OSNAME), Darwin)
|
||||
PLATFORM = bsd
|
||||
JT_PLATFORM = linux
|
||||
ARCH = $(shell uname -m)
|
||||
ifeq ($(ARCH), i386)
|
||||
ARCH=i586
|
||||
endif
|
||||
endif
|
||||
ifeq ($(OSNAME), Windows_NT)
|
||||
# MKS
|
||||
PLATFORM=windows
|
||||
@ -251,6 +259,7 @@ javap: JTREG_TESTDIRS = tools/javap
|
||||
# JTREG_REFERENCE
|
||||
# (Optional) reference results (e.g. work, report or summary.txt)
|
||||
#
|
||||
jtreg_tests: jtreg-tests
|
||||
jtreg-tests: check-jtreg FRC
|
||||
@rm -f -r $(JTREG_OUTPUT_DIR)/JTwork $(JTREG_OUTPUT_DIR)/JTreport \
|
||||
$(JTREG_OUTPUT_DIR)/diff.html $(JTREG_OUTPUT_DIR)/status.txt
|
||||
|
||||
@ -1,159 +0,0 @@
|
||||
#!echo "This is not a shell script"
|
||||
#############################################################################
|
||||
# Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#############################################################################
|
||||
#
|
||||
# JPRT shell configuration for testing.
|
||||
#
|
||||
# Input environment variables:
|
||||
# Windows Only:
|
||||
# PATH
|
||||
# ROOTDIR
|
||||
#
|
||||
# Output variable settings:
|
||||
# make Full path to GNU make
|
||||
#
|
||||
# Output environment variables:
|
||||
# PATH
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
#############################################################################
|
||||
# Error
|
||||
error() # message
|
||||
{
|
||||
echo "ERROR: $1"
|
||||
exit 6
|
||||
}
|
||||
# Directory must exist
|
||||
dirMustExist() # dir name
|
||||
{
|
||||
if [ ! -d "$1" ] ; then
|
||||
error "Directory for $2 does not exist: $1"
|
||||
fi
|
||||
}
|
||||
# File must exist
|
||||
fileMustExist() # dir name
|
||||
{
|
||||
if [ ! -f "$1" ] ; then
|
||||
error "File for $2 does not exist: $1"
|
||||
fi
|
||||
}
|
||||
#############################################################################
|
||||
|
||||
# Should be set by JPRT as the 3 basic inputs
|
||||
slashjava="${ALT_SLASH_JAVA}"
|
||||
if [ "${slashjava}" = "" ] ; then
|
||||
slashjava=/java
|
||||
fi
|
||||
|
||||
# Check input
|
||||
dirMustExist "${slashjava}" ALT_SLASH_JAVA
|
||||
|
||||
# Uses 'uname -s', but only expect SunOS or Linux, assume Windows otherwise.
|
||||
osname=`uname -s`
|
||||
if [ "${osname}" = SunOS ] ; then
|
||||
|
||||
# SOLARIS: Sparc or X86
|
||||
osarch=`uname -p`
|
||||
if [ "${osarch}" = sparc ] ; then
|
||||
solaris_arch=sparc
|
||||
else
|
||||
solaris_arch=i386
|
||||
fi
|
||||
|
||||
# Add basic solaris system paths
|
||||
path4sdk=/usr/ccs/bin:/usr/ccs/lib:/usr/bin:/bin:/usr/sfw/bin
|
||||
|
||||
# Find GNU make
|
||||
make=/usr/sfw/bin/gmake
|
||||
if [ ! -f ${make} ] ; then
|
||||
make=/opt/sfw/bin/gmake
|
||||
if [ ! -f ${make} ] ; then
|
||||
make=${slashjava}/devtools/${solaris_arch}/bin/gnumake
|
||||
fi
|
||||
fi
|
||||
fileMustExist "${make}" make
|
||||
|
||||
# File creation mask
|
||||
umask 002
|
||||
|
||||
elif [ "${osname}" = Linux ] ; then
|
||||
|
||||
# Add basic paths
|
||||
path4sdk=/usr/bin:/bin:/usr/sbin:/sbin
|
||||
|
||||
# Find GNU make
|
||||
make=/usr/bin/make
|
||||
fileMustExist "${make}" make
|
||||
|
||||
umask 002
|
||||
|
||||
else
|
||||
|
||||
# Windows: Differs on CYGWIN vs. MKS.
|
||||
|
||||
# We need to determine if we are running a CYGWIN shell or an MKS shell
|
||||
# (if uname isn't available, then it will be unix_toolset=unknown)
|
||||
unix_toolset=unknown
|
||||
if [ "`uname -a | fgrep Cygwin`" = "" -a -d "${ROOTDIR}" ] ; then
|
||||
# We kind of assume ROOTDIR is where MKS is and it's ok
|
||||
unix_toolset=MKS
|
||||
mkshome=`dosname -s "${ROOTDIR}"`
|
||||
# Most unix utilities are in the mksnt directory of ROOTDIR
|
||||
unixcommand_path="${mkshome}/mksnt"
|
||||
path4sdk="${unixcommand_path}"
|
||||
devtools_path="${slashjava}/devtools/win32/bin"
|
||||
path4sdk="${devtools_path};${path4sdk}"
|
||||
# Find GNU make
|
||||
make="${devtools_path}/gnumake.exe"
|
||||
fileMustExist "${make}" make
|
||||
elif [ "`uname -a | fgrep Cygwin`" != "" -a -f /bin/cygpath ] ; then
|
||||
# For CYGWIN, uname will have "Cygwin" in it, and /bin/cygpath should exist
|
||||
unix_toolset=CYGWIN
|
||||
# Most unix utilities are in the /usr/bin
|
||||
unixcommand_path="/usr/bin"
|
||||
path4sdk="${unixcommand_path}"
|
||||
# Find GNU make
|
||||
make="${unixcommand_path}/make.exe"
|
||||
fileMustExist "${make}" make
|
||||
else
|
||||
echo "WARNING: Cannot figure out if this is MKS or CYGWIN"
|
||||
fi
|
||||
|
||||
|
||||
# For windows, it's hard to know where the system is, so we just add this
|
||||
# to PATH.
|
||||
slash_path="`echo ${path4sdk} | sed -e 's@\\\\@/@g' -e 's@//@/@g' -e 's@/$@@' -e 's@/;@;@g'`"
|
||||
path4sdk="${slash_path};${PATH}"
|
||||
|
||||
# Convert path4sdk to cygwin style
|
||||
if [ "${unix_toolset}" = CYGWIN ] ; then
|
||||
path4sdk="`/usr/bin/cygpath -p ${path4sdk}`"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
# Export PATH setting
|
||||
PATH="${path4sdk}"
|
||||
export PATH
|
||||
|
||||
@ -44,7 +44,7 @@ fi
|
||||
# set platform-dependent variables
|
||||
OS=`uname -s`
|
||||
case "$OS" in
|
||||
SunOS | Linux )
|
||||
SunOS | Linux | Darwin )
|
||||
FS="/"
|
||||
;;
|
||||
CYGWIN* )
|
||||
|
||||
@ -41,7 +41,7 @@ fi
|
||||
# set platform-dependent variables
|
||||
OS=`uname -s`
|
||||
case "$OS" in
|
||||
SunOS | Linux )
|
||||
SunOS | Linux | Darwin )
|
||||
FS="/"
|
||||
;;
|
||||
CYGWIN* )
|
||||
|
||||
60
langtools/test/tools/javac/7132880/T7132880.java
Normal file
60
langtools/test/tools/javac/7132880/T7132880.java
Normal file
@ -0,0 +1,60 @@
|
||||
/*
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 7132880
|
||||
* @summary Resolve should support nested resolution contexts
|
||||
* @compile/fail/ref=T7132880.out -XDrawDiagnostics T7132880.java
|
||||
*/
|
||||
class Outer {
|
||||
void m1(String s) { }
|
||||
void m2(int i1, int i2) { }
|
||||
|
||||
class Inner {
|
||||
void test() {
|
||||
//ok - no method named 'm' in Inner - hence, class to search is Outer
|
||||
m1("");
|
||||
}
|
||||
}
|
||||
|
||||
class Inner1 {
|
||||
void m1(Integer i) { }
|
||||
|
||||
void test() {
|
||||
//error - Inner1 defines an incompatible method - hence, class to search is Inner1
|
||||
m1("");
|
||||
}
|
||||
}
|
||||
|
||||
class Inner2 {
|
||||
private void m1(Integer i) { }
|
||||
private void m1(Double d) { }
|
||||
|
||||
void test() {
|
||||
//error - Inner2 defines multiple incompatible methods - hence, class to search is Inner2
|
||||
m1("");
|
||||
}
|
||||
}
|
||||
|
||||
class Inner3 {
|
||||
private void m2(Object o, int i) { }
|
||||
private void m2(int i, Object o) { }
|
||||
|
||||
void test() {
|
||||
//error - Inner3 defines multiple ambiguous methods - hence, class to search is Inner3
|
||||
m2(1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
class Inner4 extends Inner2 {
|
||||
void test() {
|
||||
//ok - Inner2 defines multiple incompatible inaccessible methods - hence, class to search is Outer
|
||||
m1("");
|
||||
}
|
||||
}
|
||||
|
||||
class Inner5 extends Inner3 {
|
||||
void test() {
|
||||
//ok - Inner3 defines multiple inaccessible ambiguous methods - hence, class to search is Outer
|
||||
m2(1, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
4
langtools/test/tools/javac/7132880/T7132880.out
Normal file
4
langtools/test/tools/javac/7132880/T7132880.out
Normal file
@ -0,0 +1,4 @@
|
||||
T7132880.java:23:12: compiler.err.cant.apply.symbol.1: kindname.method, m1, java.lang.Integer, java.lang.String, kindname.class, Outer.Inner1, (compiler.misc.no.conforming.assignment.exists: java.lang.String, java.lang.Integer)
|
||||
T7132880.java:33:12: compiler.err.cant.apply.symbols: kindname.method, m1, java.lang.String,{(compiler.misc.inapplicable.method: kindname.method, Outer.Inner2, m1(java.lang.Double), (compiler.misc.no.conforming.assignment.exists: java.lang.String, java.lang.Double)),(compiler.misc.inapplicable.method: kindname.method, Outer.Inner2, m1(java.lang.Integer), (compiler.misc.no.conforming.assignment.exists: java.lang.String, java.lang.Integer))}
|
||||
T7132880.java:43:12: compiler.err.ref.ambiguous: m2, kindname.method, m2(java.lang.Object,int), Outer.Inner3, kindname.method, m2(int,java.lang.Object), Outer.Inner3
|
||||
3 errors
|
||||
@ -56,7 +56,7 @@ echo "CLASSPATH=${CLASSPATH}"
|
||||
# set platform-dependent variables
|
||||
OS=`uname -s`
|
||||
case "$OS" in
|
||||
SunOS | Linux | CYGWIN* )
|
||||
SunOS | Linux | Darwin | CYGWIN* )
|
||||
FS="/"
|
||||
;;
|
||||
Windows* )
|
||||
|
||||
@ -54,7 +54,7 @@ echo "CLASSPATH=${CLASSPATH}"
|
||||
# set platform-dependent variables
|
||||
OS=`uname -s`
|
||||
case "$OS" in
|
||||
SunOS | Linux )
|
||||
SunOS | Linux | Darwin )
|
||||
PS=":"
|
||||
FS="/"
|
||||
;;
|
||||
|
||||
@ -47,7 +47,7 @@ echo "CLASSPATH=${CLASSPATH}"
|
||||
# set platform-dependent variables
|
||||
OS=`uname -s`
|
||||
case "$OS" in
|
||||
SunOS | Linux | CYGWIN* )
|
||||
SunOS | Linux | Darwin | CYGWIN* )
|
||||
FS="/"
|
||||
;;
|
||||
Windows* )
|
||||
|
||||
@ -52,7 +52,7 @@ echo "CLASSPATH=${CLASSPATH}"
|
||||
# set platform-dependent variables
|
||||
OS=`uname -s`
|
||||
case "$OS" in
|
||||
SunOS | Linux )
|
||||
SunOS | Linux | Darwin )
|
||||
PS=":"
|
||||
FS="/"
|
||||
;;
|
||||
|
||||
@ -47,7 +47,7 @@ echo "CLASSPATH=${CLASSPATH}"
|
||||
# set platform-dependent variables
|
||||
OS=`uname -s`
|
||||
case "$OS" in
|
||||
SunOS | Linux | CYGWIN* )
|
||||
SunOS | Linux | Darwin | CYGWIN* )
|
||||
FS="/"
|
||||
;;
|
||||
Windows* )
|
||||
|
||||
@ -47,7 +47,7 @@ echo "CLASSPATH=${CLASSPATH}"
|
||||
# set platform-dependent variables
|
||||
OS=`uname -s`
|
||||
case "$OS" in
|
||||
SunOS | Linux )
|
||||
SunOS | Linux | Darwin )
|
||||
PS=":"
|
||||
FS="/"
|
||||
;;
|
||||
|
||||
@ -48,7 +48,7 @@ echo
|
||||
# set platform-dependent variables
|
||||
OS=`uname -s`
|
||||
case "$OS" in
|
||||
SunOS | Linux )
|
||||
SunOS | Linux | Darwin )
|
||||
FS="/"
|
||||
;;
|
||||
CYGWIN* )
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
T6723444.java:42:9: compiler.err.unreported.exception.need.to.catch.or.throw: X2
|
||||
T6723444.java:43:9: compiler.err.unreported.exception.need.to.catch.or.throw: X2
|
||||
T6723444.java:42:9: compiler.err.unreported.exception.need.to.catch.or.throw: java.lang.Throwable
|
||||
T6723444.java:43:9: compiler.err.unreported.exception.need.to.catch.or.throw: java.lang.Throwable
|
||||
T6723444.java:45:32: compiler.err.unreported.exception.need.to.catch.or.throw: java.lang.Throwable
|
||||
T6723444.java:46:17: compiler.err.unreported.exception.need.to.catch.or.throw: java.lang.Throwable
|
||||
T6723444.java:48:9: compiler.err.unreported.exception.need.to.catch.or.throw: java.lang.Throwable
|
||||
|
||||
25
langtools/test/tools/javac/generics/7151070/T7151070.java
Normal file
25
langtools/test/tools/javac/generics/7151070/T7151070.java
Normal file
@ -0,0 +1,25 @@
|
||||
/*
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 7151070
|
||||
* @summary NullPointerException in Resolve.isAccessible
|
||||
* @compile/fail/ref=T7151070.out -XDrawDiagnostics T7151070.java
|
||||
*/
|
||||
|
||||
class T7151070a {
|
||||
private static class PrivateCls { }
|
||||
public static class PublicCls extends PrivateCls { }
|
||||
|
||||
public void m(PrivateCls p) { }
|
||||
}
|
||||
|
||||
class T7151070b {
|
||||
public void test(Test<T7151070a.PublicCls> obj, T7151070a outer) {
|
||||
outer.m(obj.get());
|
||||
}
|
||||
|
||||
public static class Test<T> {
|
||||
public T get() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
2
langtools/test/tools/javac/generics/7151070/T7151070.out
Normal file
2
langtools/test/tools/javac/generics/7151070/T7151070.out
Normal file
@ -0,0 +1,2 @@
|
||||
T7151070.java:17:24: compiler.err.report.access: T7151070a.PrivateCls, private, T7151070a
|
||||
1 error
|
||||
43
langtools/test/tools/javac/generics/7151802/T7151802.java
Normal file
43
langtools/test/tools/javac/generics/7151802/T7151802.java
Normal file
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 7151802
|
||||
* @summary compiler update caused sqe test failed
|
||||
* @compile/fail/ref=T7151802.out -Werror -Xlint:unchecked -XDrawDiagnostics T7151802.java
|
||||
*/
|
||||
class T7151802 {
|
||||
static class Foo<X> { }
|
||||
|
||||
static class SubFoo<X> extends Foo<X> { }
|
||||
|
||||
//generic - bound - arg - non-slilent
|
||||
<Z extends Foo<String>> void get1(Z fz) { }
|
||||
void test1(Foo foo) { get1(foo); }
|
||||
|
||||
//generic - bound - arg - silent
|
||||
<Z extends Foo<?>> void get2(Z fz) { }
|
||||
void test2(Foo foo) { get2(foo); }
|
||||
|
||||
//generic - nobound - arg - non-slilent
|
||||
<Z> void get3(Foo<Z> fz) { }
|
||||
void test(Foo foo) { get3(foo); }
|
||||
|
||||
//generic - nobound - arg - slilent
|
||||
<Z> void get4(Foo<?> fz) { }
|
||||
void test4(Foo foo) { get4(foo); }
|
||||
|
||||
//generic - bound - ret - non-slilent
|
||||
<Z extends Foo<String>> Z get5() { return null; }
|
||||
void test5() { SubFoo sf = get5(); }
|
||||
|
||||
//generic - bound - ret - slilent
|
||||
static <Z extends Foo<?>> Z get6() { return null; }
|
||||
void test6() { SubFoo sf = get6(); }
|
||||
|
||||
//nogeneric - nobound - arg - non-slilent
|
||||
void get7(Foo<String> fz) { }
|
||||
void test7(Foo foo) { get7(foo); }
|
||||
|
||||
//nogeneric - nobound - arg - slilent
|
||||
static void get8(Foo<?> fz) { }
|
||||
void test8(Foo foo) { get8(foo); }
|
||||
}
|
||||
9
langtools/test/tools/javac/generics/7151802/T7151802.out
Normal file
9
langtools/test/tools/javac/generics/7151802/T7151802.out
Normal file
@ -0,0 +1,9 @@
|
||||
T7151802.java:14:31: compiler.warn.unchecked.meth.invocation.applied: kindname.method, get1, Z, T7151802.Foo, kindname.class, T7151802
|
||||
T7151802.java:22:31: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), T7151802.Foo, T7151802.Foo<Z>
|
||||
T7151802.java:22:30: compiler.warn.unchecked.meth.invocation.applied: kindname.method, get3, T7151802.Foo<Z>, T7151802.Foo, kindname.class, T7151802
|
||||
T7151802.java:30:36: compiler.warn.unchecked.meth.invocation.applied: kindname.method, get5, compiler.misc.no.args, compiler.misc.no.args, kindname.class, T7151802
|
||||
T7151802.java:38:32: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), T7151802.Foo, T7151802.Foo<java.lang.String>
|
||||
T7151802.java:38:31: compiler.warn.unchecked.meth.invocation.applied: kindname.method, get7, T7151802.Foo<java.lang.String>, T7151802.Foo, kindname.class, T7151802
|
||||
- compiler.err.warnings.and.werror
|
||||
1 error
|
||||
6 warnings
|
||||
@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 7148556
|
||||
* @summary Implementing a generic interface causes a public clone() to become inaccessible
|
||||
* @compile T7148556.java
|
||||
*/
|
||||
|
||||
class T7148556 {
|
||||
|
||||
interface A extends Cloneable {
|
||||
public Object clone();
|
||||
}
|
||||
|
||||
interface B extends A, java.util.List { }
|
||||
|
||||
void test(B b) {
|
||||
b.clone();
|
||||
}
|
||||
}
|
||||
35
langtools/test/tools/javac/generics/typevars/T7148242.java
Normal file
35
langtools/test/tools/javac/generics/typevars/T7148242.java
Normal file
@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 7148242
|
||||
* @summary Regression: valid code rejected during generic type well-formedness check
|
||||
* @compile T7148242.java
|
||||
*/
|
||||
class T7148242 {
|
||||
static abstract class A<K, V, I extends Pair<K, V>, I2 extends Pair<V, K>> {
|
||||
abstract A<V, K, I2, I> test();
|
||||
}
|
||||
static class Pair<K, V> { }
|
||||
}
|
||||
@ -53,7 +53,7 @@ echo "CLASSPATH=${CLASSPATH}"
|
||||
# set platform-dependent variables
|
||||
OS=`uname -s`
|
||||
case "$OS" in
|
||||
SunOS | Linux | CYGWIN* )
|
||||
SunOS | Linux | Darwin | CYGWIN* )
|
||||
FS="/"
|
||||
;;
|
||||
Windows* )
|
||||
|
||||
@ -41,7 +41,7 @@ fi
|
||||
# set platform-dependent variables
|
||||
OS=`uname -s`
|
||||
case "$OS" in
|
||||
SunOS | Linux )
|
||||
SunOS | Linux | Darwin )
|
||||
FS="/"
|
||||
SCR=`pwd`
|
||||
;;
|
||||
|
||||
@ -53,7 +53,7 @@ echo "CLASSPATH=${CLASSPATH}"
|
||||
# set platform-dependent variables
|
||||
OS=`uname -s`
|
||||
case "$OS" in
|
||||
SunOS | Linux )
|
||||
SunOS | Linux | Darwin )
|
||||
NULL=/dev/null
|
||||
PS=":"
|
||||
FS="/"
|
||||
|
||||
@ -50,7 +50,7 @@ echo "CLASSPATH=${CLASSPATH}"
|
||||
# set platform-dependent variables
|
||||
OS=`uname -s`
|
||||
case "$OS" in
|
||||
SunOS | Linux | CYGWIN* )
|
||||
SunOS | Linux | Darwin | CYGWIN* )
|
||||
FS="/"
|
||||
;;
|
||||
Windows* )
|
||||
|
||||
@ -41,7 +41,7 @@ echo "CLASSPATH=${CLASSPATH}"
|
||||
# set platform-dependent variables
|
||||
OS=`uname -s`
|
||||
case "$OS" in
|
||||
SunOS | Linux | CYGWIN* )
|
||||
SunOS | Linux | Darwin | CYGWIN* )
|
||||
FS="/"
|
||||
;;
|
||||
Windows_95 | Windows_98 | Windows_NT )
|
||||
|
||||
@ -55,7 +55,7 @@ echo "CLASSPATH=${CLASSPATH}"
|
||||
# set platform-dependent variables
|
||||
OS=`uname -s`
|
||||
case "$OS" in
|
||||
SunOS | Linux )
|
||||
SunOS | Linux | Darwin )
|
||||
if [ -d /usr/lib/locale/en_US.UTF-8 -o -d /usr/lib/locale/en_US.utf8 ]
|
||||
then
|
||||
ENV="env LANG=en_US.UTF-8"
|
||||
|
||||
@ -41,7 +41,7 @@ fi
|
||||
# set platform-dependent variables
|
||||
OS=`uname -s`
|
||||
case "$OS" in
|
||||
SunOS | Linux )
|
||||
SunOS | Linux | Darwin )
|
||||
PS=":"
|
||||
FS="/"
|
||||
;;
|
||||
|
||||
@ -56,7 +56,7 @@ EXPECTED_JAVAH_OUT_FILE=SubClassConsts.out
|
||||
# set platform-dependent variables
|
||||
OS=`uname -s`
|
||||
case "$OS" in
|
||||
SunOS | Linux )
|
||||
SunOS | Linux | Darwin )
|
||||
PS=":"
|
||||
FS="/"
|
||||
;;
|
||||
|
||||
@ -58,7 +58,7 @@ echo "CLASSPATH=${CLASSPATH}"
|
||||
# set platform-dependent variables
|
||||
OS=`uname -s`
|
||||
case "$OS" in
|
||||
SunOS | Linux | CYGWIN* )
|
||||
SunOS | Linux | Darwin | CYGWIN* )
|
||||
PS=":"
|
||||
FS="/"
|
||||
;;
|
||||
|
||||
@ -43,7 +43,7 @@ fi
|
||||
# set platform-dependent variables
|
||||
OS=`uname -s`
|
||||
case "$OS" in
|
||||
SunOS | Linux | CYGWIN* )
|
||||
SunOS | Linux | Darwin | CYGWIN* )
|
||||
PS=":"
|
||||
FS="/"
|
||||
;;
|
||||
|
||||
@ -40,7 +40,7 @@ echo "TESTJAVA=${TESTJAVA}"
|
||||
# set platform-dependent variables
|
||||
OS=`uname -s`
|
||||
case "$OS" in
|
||||
SunOS | Linux | CYGWIN* )
|
||||
SunOS | Linux | Darwin | CYGWIN* )
|
||||
FS="/"
|
||||
;;
|
||||
Windows* )
|
||||
|
||||
@ -79,7 +79,7 @@ endef
|
||||
# Find all build_time_* files and print their contents in a list sorted
|
||||
# on the name of the sub repository.
|
||||
define ReportBuildTimes
|
||||
$(PRINTF) "-- Build times ----------\nTarget %s\nStart %s\nEnd %s\n%s\n%s\n-------------------------\n" \
|
||||
$(PRINTF) -- "-- Build times ----------\nTarget %s\nStart %s\nEnd %s\n%s\n%s\n-------------------------\n" \
|
||||
$1 \
|
||||
"`$(CAT) $(BUILDTIMESDIR)/build_time_start_TOTAL_human_readable`" \
|
||||
"`$(CAT) $(BUILDTIMESDIR)/build_time_end_TOTAL_human_readable`" \
|
||||
|
||||
@ -39,6 +39,7 @@ jprt.build.targets= \
|
||||
solaris_x64_5.10-{product|fastdebug}, \
|
||||
linux_i586_2.6-{product|fastdebug}, \
|
||||
linux_x64_2.6-{product|fastdebug}, \
|
||||
macosx_x64_10.7-{product|fastdebug}, \
|
||||
windows_i586_5.1-{product|fastdebug}, \
|
||||
windows_x64_5.2-{product|fastdebug}
|
||||
|
||||
@ -53,6 +54,7 @@ jprt.my.test.target.set= \
|
||||
solaris_x64_5.10-product-c2-TESTNAME, \
|
||||
linux_i586_2.6-product-{c1|c2}-TESTNAME, \
|
||||
linux_x64_2.6-product-c2-TESTNAME, \
|
||||
macosx_x64_10.7-product-c2-TESTNAME, \
|
||||
windows_i586_5.1-product-c1-TESTNAME, \
|
||||
windows_x64_5.2-product-c2-TESTNAME
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user