This commit is contained in:
J. Duke 2021-02-05 12:08:10 -08:00
commit b192ecc966
374 changed files with 12615 additions and 4511 deletions

View File

@ -417,9 +417,43 @@ b25838a28195f4b6dab34668411eedd2d366a16c jdk-9+169
2c25fc24103251f9711a1c280c31e1e41016d90f jdk-9+172
88d7fd969e7df0e07a53b201cfd29393ca33ede9 jdk-9+173
5466f409346e0446ee9a6daeb7f5d75c8fc76823 jdk-9+174
023f93e511bae768203c33bb8681f82ee75014da jdk-9.0.1+00
023f93e511bae768203c33bb8681f82ee75014da jdk-9.0.3+00
8f7227c6012b0051ea4e0bcee040c627bf699b88 jdk-9+175
84777531d994ef70163d35078ec9c4127f2eadb5 jdk-9+176
a4371edb589c60db01142e45c317adb9ccbcb083 jdk-9+177
ec4159ebe7050fcc5dcee8a2d150cf948ecc97db jdk-9+178
252475ccfd84cc249f8d6faf4b7806b5e2c384ce jdk-9+179
d2982a786f53814367698e63efe6349c9128e1db jdk-9+180
b656dea9398ef601f7fc08d1a5157a560e0ccbe0 jdk-9+181
d73368c690d4f1ab188cf306f4b27218e28596b6 jdk-9.0.3+1
ede48839f34b0b74210e2e081872a3c12d5339ab jdk-9.0.3+2
086e9950ebfa8a0239018ade61f59b7c539bacc9 jdk-9.0.3+3
2c95bee2722f2396b709b384473c07291a7d1e4b jdk-9.0.3+4
d24281b60e0bb6d441ec3a9440e7daa322bbc822 jdk-9.0.3+5
489c57f8e1c0f6fa34de86f8ed8f98a809cba4a9 jdk-9.0.3+6
9d5aca497123931d52625b3539a8549d98728622 jdk-9.0.3+7
eaa4ea516c7f1e31c8e0faaec3ef981eb2919ae3 jdk-9.0.3+8
a31dfd85bee9c16aac1e65dfbe81d1c5fe443c2c jdk-9.0.3+9
9acb1002f33e257e932a188632969e45cc32e66c jdk-9.0.1+10
9acb1002f33e257e932a188632969e45cc32e66c jdk-9.0.1+10
0000000000000000000000000000000000000000 jdk-9.0.1+10
0000000000000000000000000000000000000000 jdk-9.0.1+10
5a9191c980ca3ada63b234e2b9ec6dc23bd37595 jdk-9.0.1+10
e6edc89f5b2dc6dacd6041305e942a3f04a25ce5 jdk-9.0.1+11
3a64fdb24a8c26e2d7d32864dad4425a9496b90d jdk-9.0.4+00
726bf8524f7d3780518ada8648488ad4a7bfe6a2 jdk-9.0.4+1
8055b6778ac8fc6bb165082230951cc8f146f8fd jdk-9.0.4+2
572ea0db1d87a1d2fcc01f73ffbcfb78bd5688f4 jdk-9.0.4+3
0053ace2e9e484fb52d00ec961e24805d0aae04a jdk-9.0.4+4
73d63ccf56f46f258f367ed72633f0f5cc229680 jdk-9.0.4+5
86219e4c9f8cd730bacd2f6080b6ac1dea7a0226 jdk-9.0.4+6
9aba57f3071362ed7f2326d737506863b9d2646f jdk-9.0.4+7
a4f0515fe6da55cfe74dec3e6e30b69c9693d133 jdk-9.0.4+8
a4f0515fe6da55cfe74dec3e6e30b69c9693d133 jdk-9.0.4+8
0000000000000000000000000000000000000000 jdk-9.0.4+8
0000000000000000000000000000000000000000 jdk-9.0.4+8
953d306b203e7d0808cb842a51e006fddc41b6c2 jdk-9.0.4+8
c6f4c28a56ef14fb9a41303390b9584976765502 jdk-9.0.4+9
409c6b8aa5cae19a701ddd2fb09f85fb9af7da78 jdk-9.0.4+10
620cbf135de96df32c78c2693cfbf275dec1cb4d jdk-9.0.4+11

View File

@ -1 +1,2 @@
project=jdk9
bugids=dup

37
ADDITIONAL_LICENSE_INFO Normal file
View File

@ -0,0 +1,37 @@
ADDITIONAL INFORMATION ABOUT LICENSING
Certain files distributed by Oracle America, Inc. and/or its affiliates are
subject to the following clarification and special exception to the GPLv2,
based on the GNU Project exception for its Classpath libraries, known as the
GNU Classpath Exception.
Note that Oracle includes multiple, independent programs in this software
package. Some of those programs are provided under licenses deemed
incompatible with the GPLv2 by the Free Software Foundation and others.
For example, the package includes programs licensed under the Apache
License, Version 2.0 and may include FreeType. Such programs are licensed
to you under their original licenses.
Oracle facilitates your further distribution of this package by adding the
Classpath Exception to the necessary parts of its GPLv2 code, which permits
you to use that code in combination with other independent modules not
licensed under the GPLv2. However, note that this would not permit you to
commingle code under an incompatible license with Oracle's GPLv2 licensed
code by, for example, cutting and pasting such code into a file also
containing Oracle's GPLv2 licensed code and then distributing the result.
Additionally, if you were to remove the Classpath Exception from any of the
files to which it applies and distribute the result, you would likely be
required to license some or all of the other code in that distribution under
the GPLv2 as well, and since the GPLv2 is incompatible with the license terms
of some items included in the distribution by Oracle, removing the Classpath
Exception could therefore effectively compromise your ability to further
distribute the package.
Failing to distribute notices associated with some files may also create
unexpected legal consequences.
Proceed with caution and we recommend that you obtain the advice of a lawyer
skilled in open source matters before removing the Classpath Exception or
making modifications to this package which may subsequently be redistributed
and/or involve the use of third party software.

View File

@ -1090,10 +1090,6 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
# We can build without it.
LDD="true"
fi
BASIC_PATH_PROGS(OTOOL, otool)
if test "x$OTOOL" = "x"; then
OTOOL="true"
fi
BASIC_PATH_PROGS(READELF, [greadelf readelf])
BASIC_PATH_PROGS(DOT, dot)
BASIC_PATH_PROGS(HG, hg)

File diff suppressed because it is too large Load Diff

View File

@ -443,20 +443,31 @@ AC_DEFUN_ONCE([LIB_SETUP_FREETYPE],
fi
AC_MSG_RESULT([$BUNDLE_FREETYPE])
fi # end freetype needed
FREETYPE_LICENSE=""
if test "x$with_freetype_license" = "xyes"; then
AC_MSG_ERROR([--with-freetype-license must have a value])
elif test "x$with_freetype_license" != "x"; then
AC_MSG_CHECKING([for freetype license])
AC_MSG_RESULT([$with_freetype_license])
FREETYPE_LICENSE="$with_freetype_license"
BASIC_FIXUP_PATH(FREETYPE_LICENSE)
if test ! -f "$FREETYPE_LICENSE"; then
AC_MSG_ERROR([$FREETYPE_LICENSE cannot be found])
if test "x$BUNDLE_FREETYPE" = xyes; then
FREETYPE_LICENSE=""
AC_MSG_CHECKING([for freetype license])
if test "x$with_freetype_license" = "xyes"; then
AC_MSG_RESULT([no])
AC_MSG_ERROR([--with-freetype-license must have a value])
elif test "x$with_freetype_license" != "x"; then
AC_MSG_RESULT([$with_freetype_license])
FREETYPE_LICENSE="$with_freetype_license"
BASIC_FIXUP_PATH(FREETYPE_LICENSE)
if test ! -f "$FREETYPE_LICENSE"; then
AC_MSG_ERROR([$FREETYPE_LICENSE cannot be found])
fi
else
if test "x$with_freetype" != "x" && test -f $with_freetype/freetype.md; then
FREETYPE_LICENSE="$with_freetype/freetype.md"
AC_MSG_RESULT([$FREETYPE_LICENSE])
BASIC_FIXUP_PATH(FREETYPE_LICENSE)
else
AC_MSG_RESULT([no])
fi
fi
fi
fi
fi # end freetype needed
AC_SUBST(FREETYPE_BUNDLE_LIB_PATH)
AC_SUBST(FREETYPE_CFLAGS)

View File

@ -483,6 +483,7 @@ GNM:=@GNM@
STRIP:=@STRIP@
LIPO:=@LIPO@
INSTALL_NAME_TOOL:=@INSTALL_NAME_TOOL@
# Options to linker to specify a mapfile.
# (Note absence of := assignment, because we do not want to evaluate the macro body here)

View File

@ -628,6 +628,10 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_EXTRA],
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
BASIC_PATH_PROGS(LIPO, lipo)
BASIC_FIXUP_EXECUTABLE(LIPO)
BASIC_REQUIRE_PROGS(OTOOL, otool)
BASIC_FIXUP_EXECUTABLE(OTOOL)
BASIC_REQUIRE_PROGS(INSTALL_NAME_TOOL, install_name_tool)
BASIC_FIXUP_EXECUTABLE(INSTALL_NAME_TOOL)
fi
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2017, 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
@ -27,7 +27,7 @@
DEFAULT_VERSION_MAJOR=9
DEFAULT_VERSION_MINOR=0
DEFAULT_VERSION_SECURITY=0
DEFAULT_VERSION_SECURITY=4
DEFAULT_VERSION_PATCH=0
LAUNCHER_NAME=openjdk

View File

@ -387,7 +387,7 @@ var getJibProfilesCommon = function (input, data) {
// on such hardware.
if (input.build_cpu == "sparcv9") {
var cpu_brand = $EXEC("bash -c \"kstat -m cpu_info | grep brand | head -n1 | awk '{ print \$2 }'\"");
if (cpu_brand.trim().match('SPARC-.7')) {
if (cpu_brand.trim().match('SPARC-.[78]')) {
boot_jdk_revision = "8u20";
boot_jdk_subdirpart = "1.8.0_20";
}
@ -435,7 +435,7 @@ var getJibProfilesProfiles = function (input, common, data) {
"macosx-x64": {
target_os: "macosx",
target_cpu: "x64",
dependencies: ["devkit"],
dependencies: ["devkit", "freetype"],
configure_args: concat(common.configure_args_64bit, "--with-zlib=system"),
},
@ -728,9 +728,9 @@ var getJibProfilesProfiles = function (input, common, data) {
jdk: {
local: "bundles/\\(jdk.*bin.tar.gz\\)",
remote: [
"bundles/openjdk/GPL/linux-x64/jdk-" + data.version
"bundles/openjdk/GPL/linux-x64/openjdk-" + data.version
+ "_linux-x64_bin.tar.gz",
"bundles/openjdk/GPL/linux-x64/\\1"
"bundles/openjdk/GPL/linux-x64/open\\1"
],
subdir: "jdk-" + data.version
},
@ -741,17 +741,17 @@ var getJibProfilesProfiles = function (input, common, data) {
test: {
local: "bundles/\\(jdk.*bin-tests.tar.gz\\)",
remote: [
"bundles/openjdk/GPL/linux-x64/jdk-" + data.version
"bundles/openjdk/GPL/linux-x64/openjdk-" + data.version
+ "_linux-x64_bin-tests.tar.gz",
"bundles/openjdk/GPL/linux-x64/\\1"
"bundles/openjdk/GPL/linux-x64/open\\1"
]
},
jdk_symbols: {
local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)",
remote: [
"bundles/openjdk/GPL/linux-x64/jdk-" + data.version
"bundles/openjdk/GPL/linux-x64/openjdk-" + data.version
+ "_linux-x64_bin-symbols.tar.gz",
"bundles/openjdk/GPL/linux-x64/\\1"
"bundles/openjdk/GPL/linux-x64/open\\1"
],
subdir: "jdk-" + data.version
},
@ -771,27 +771,27 @@ var getJibProfilesProfiles = function (input, common, data) {
jdk: {
local: "bundles/\\(jdk.*bin.tar.gz\\)",
remote: [
"bundles/openjdk/GPL/linux-x86/jdk-" + data.version
"bundles/openjdk/GPL/linux-x86/openjdk-" + data.version
+ "_linux-x86_bin.tar.gz",
"bundles/openjdk/GPL/linux-x86/\\1"
"bundles/openjdk/GPL/linux-x86/open\\1"
],
subdir: "jdk-" + data.version
},
jdk_symbols: {
local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)",
remote: [
"bundles/openjdk/GPL/linux-x86/jdk-" + data.version
"bundles/openjdk/GPL/linux-x86/openjdk-" + data.version
+ "_linux-x86_bin-symbols.tar.gz",
"bundles/openjdk/GPL/linux-x86/\\1"
"bundles/openjdk/GPL/linux-x86/open\\1"
],
subdir: "jdk-" + data.version
},
test: {
local: "bundles/\\(jdk.*bin-tests.tar.gz\\)",
remote: [
"bundles/openjdk/GPL/linux-x86/jdk-" + data.version
"bundles/openjdk/GPL/linux-x86/openjdk-" + data.version
+ "_linux-x86_bin-tests.tar.gz",
"bundles/openjdk/GPL/linux-x86/\\1"
"bundles/openjdk/GPL/linux-x86/open\\1"
]
},
jre: {
@ -814,41 +814,84 @@ var getJibProfilesProfiles = function (input, common, data) {
}
},
"windows-x86-open": {
"macosx-x64-open": {
artifacts: {
jdk: {
local: "bundles/\\(jdk.*bin.tar.gz\\)",
remote: [
"bundles/openjdk/GPL/windows-x86/jdk-" + data.version
+ "_windows-x86_bin.tar.gz",
"bundles/openjdk/GPL/windows-x86/\\1"
"bundles/openjdk/GPL/osx-x64/openjdk-" + data.version
+ "_osx-x64_bin.tar.gz",
"bundles/openjdk/GPL/osx-x64/open\\1"
],
subdir: "jdk-" + data.version
},
jre: {
local: "bundles/\\(jre.*bin.tar.gz\\)",
remote: "bundles/openjdk/GPL/windows-x86/\\1"
remote: "bundles/openjdk/GPL/osx-x64/\\1",
},
test: {
local: "bundles/\\(jdk.*bin-tests.tar.gz\\)",
remote: [
"bundles/openjdk/GPL/windows-x86/jdk-" + data.version
+ "_windows-x86_bin-tests.tar.gz",
"bundles/openjdk/GPL/windows-x86/\\1"
"bundles/openjdk/GPL/osx-x64/openjdk-" + data.version
+ "_osx-x64_bin-tests.tar.gz",
"bundles/openjdk/GPL/osx-x64/open\\1"
]
},
jdk_symbols: {
local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)",
remote: [
"bundles/openjdk/GPL/windows-x86/jdk-" + data.version
+ "_windows-x86_bin-symbols.tar.gz",
"bundles/openjdk/GPL/windows-x86/\\1"
"bundles/openjdk/GPL/osx-x64/openjdk-" + data.version
+ "_osx-x64_bin-symbols.tar.gz",
"bundles/openjdk/GPL/osx-x64/open\\1"
],
subdir: "jdk-" + data.version
},
jre_symbols: {
local: "bundles/\\(jre.*bin-symbols.tar.gz\\)",
remote: "bundles/openjdk/GPL/windows-x86/\\1",
remote: "bundles/openjdk/GPL/osx-x64/\\1",
},
doc_api_spec: {
local: "bundles/\\(jdk.*doc-api-spec.tar.gz\\)",
remote: "bundles/openjdk/GPL/osx-x64/\\1",
},
}
},
"windows-x64-open": {
artifacts: {
jdk: {
local: "bundles/\\(jdk.*bin.tar.gz\\)",
remote: [
"bundles/openjdk/GPL/windows-x64/openjdk-" + data.version
+ "_windows-x64_bin.tar.gz",
"bundles/openjdk/GPL/windows-x64/open\\1"
],
subdir: "jdk-" + data.version
},
jre: {
local: "bundles/\\(jre.*bin.tar.gz\\)",
remote: "bundles/openjdk/GPL/windows-x64/\\1"
},
test: {
local: "bundles/\\(jdk.*bin-tests.tar.gz\\)",
remote: [
"bundles/openjdk/GPL/windows-x64/openjdk-" + data.version
+ "_windows-x64_bin-tests.tar.gz",
"bundles/openjdk/GPL/windows-x64/open\\1"
]
},
jdk_symbols: {
local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)",
remote: [
"bundles/openjdk/GPL/windows-x64/openjdk-" + data.version
+ "_windows-x64_bin-symbols.tar.gz",
"bundles/openjdk/GPL/windows-x64/open\\1"
],
subdir: "jdk-" + data.version
},
jre_symbols: {
local: "bundles/\\(jre.*bin-symbols.tar.gz\\)",
remote: "bundles/openjdk/GPL/windows-x64/\\1",
}
}
},
@ -880,10 +923,11 @@ var getJibProfilesProfiles = function (input, common, data) {
profiles["linux-x64-ri"] = clone(profiles["linux-x64-open"]);
profiles["linux-x86-ri"] = clone(profiles["linux-x86-open"]);
profiles["linux-x86-ri-debug"] = clone(profiles["linux-x86-open-debug"]);
profiles["windows-x86-ri"] = clone(profiles["windows-x86-open"]);
profiles["macosx-x64-ri"] = clone(profiles["macosx-x64-open"]);
profiles["windows-x64-ri"] = clone(profiles["windows-x64-open"]);
// Generate artifacts for ri profiles
[ "linux-x64-ri", "linux-x86-ri", "linux-x86-ri-debug", "windows-x86-ri" ]
[ "linux-x64-ri", "linux-x86-ri", "linux-x86-ri-debug", "macosx-x64-ri", "windows-x64-ri" ]
.forEach(function (name) {
// Rewrite all remote dirs to "bundles/openjdk/BCL/..."
for (artifactName in profiles[name].artifacts) {
@ -893,16 +937,6 @@ var getJibProfilesProfiles = function (input, common, data) {
}
});
// The windows ri profile needs to add the freetype license file
profilesRiFreetype = {
"windows-x86-ri": {
configure_args: "--with-freetype-license="
+ input.get("freetype", "install_path")
+ "/freetype-2.7.1-v120-x86/freetype.md"
}
};
profiles = concatObjects(profiles, profilesRiFreetype);
// Generate the missing platform attributes
profiles = generatePlatformAttributes(profiles);
profiles = generateDefaultMakeTargetsConfigureArg(common, profiles);
@ -934,6 +968,12 @@ var getJibProfilesDependencies = function (input, common) {
? input.target_os + "_x64"
: input.target_platform);
var freetype_version = {
windows_x64: "2.7.1-v120+1.1",
windows_x86: "2.7.1-v120+1.1",
macosx_x64: "2.7.1-Xcode6.3-MacOSX10.9+1.0"
}[input.target_platform];
var dependencies = {
boot_jdk: {
@ -998,7 +1038,7 @@ var getJibProfilesDependencies = function (input, common) {
freetype: {
organization: common.organization,
ext: "tar.gz",
revision: "2.7.1-v120+1.0",
revision: freetype_version,
module: "freetype-" + input.target_platform
},
@ -1200,7 +1240,8 @@ var versionArgs = function(input, common) {
if (input.build_type == "promoted") {
args = concat(args,
// This needs to be changed when we start building release candidates
"--with-version-pre=ea",
// 'ea' for EA builds and empty value for 'fcs'
"--with-version-pre=",
"--without-version-opt");
} else {
args = concat(args, "--with-version-opt=" + common.build_id);

View File

@ -417,9 +417,35 @@ c62e5964cfcf144d8f72e9ba69757897785349a9 jdk-9+171
95ed14547ca9246baed34f90ef3ca13217538a8c jdk-9+172
534ba4f8cfcf12accc5b9adb943103f2ff79fe16 jdk-9+173
3615768c12904e29bb2ec1b506cd4633cd8a9ced jdk-9+174
6a33ed67219134933d276bd7575a84511a48c384 jdk-9.0.1+00
6a33ed67219134933d276bd7575a84511a48c384 jdk-9.0.3+00
dc78a3dd6b3a4f11cdae8a3e3d160e6a78bc7838 jdk-9+175
40fb9f229471ef357d493813d34b15afcce9f32b jdk-9+176
c72e9d3823f04cb3ef3166646dfea9e4c2769133 jdk-9+177
9c1e9712648921ae389d623042d22561fad82d75 jdk-9+178
24390da83c5ee9e23ceafbcaff4460a01e37bb3a jdk-9+179
6ce6cb8ff41c71c49f23b15e0f0468aca5d52b17 jdk-9+180
ba71941ad9dba53b8fffb30602ef673eee88696c jdk-9+181
53ba069e7f46ad62c8db049be90a2974dfc638e0 jdk-9.0.3+1
862693aa58490d65f1050d8d6b49d1abb40433b8 jdk-9.0.3+2
34504835797ff6c671720590636b65395d392e9e jdk-9.0.3+3
9d0501a9354d061b7e17a306dc0acc4676024c25 jdk-9.0.3+4
23f00502db730453c28633bc62071030ae1f28c5 jdk-9.0.3+5
db0ea99e2418dd88160c1c480c4c1525a5c0c993 jdk-9.0.3+6
6189293024ef2e419b54392b37ad14e8b8670ab9 jdk-9.0.3+7
b69fd398311af4f5d2b67b27c0bfa5622f971ec1 jdk-9.0.3+8
e81a65e5771c0e9e524ff310c098e042cf381e8f jdk-9.0.3+9
97fad1859593b8f8b445d170f412870bf0aceff4 jdk-9.0.1+10
f67e7e2c01929cfe7a1a3cb2f4b279c1d4fee120 jdk-9.0.1+11
0876f7e30c48b7cc0b3c15fcd3860522b1f4ae38 jdk-9.0.4+00
03683a1b2e25231ea6305c91cae4cf83d01738f0 jdk-9.0.4+1
bcb2300e20962172f7b94ba422d3e634d4f2c62c jdk-9.0.4+2
7e5bd44ac820cfb3ccceaf1c2e72d3701a625946 jdk-9.0.4+3
37249aa145988b06ec51b490e0d3d343f8faf660 jdk-9.0.4+4
ec450e8c90c53c4e4cd35468a038123ca4fe0129 jdk-9.0.4+5
7582f72a39b79c6206cdd7e0ccdfaa1ab342b040 jdk-9.0.4+6
8d2b147370b7a6ed585f1b168fe3475a6e16cb5f jdk-9.0.4+7
019e9e48d195e2aad4373e4301b068800f2ae5e6 jdk-9.0.4+8
ff3be2753e2fc6b9e05b71648c44c578a8fddc35 jdk-9.0.4+9
33c6931961a507aff9364804427d55dca9f2dd02 jdk-9.0.4+10
e0e9301af6751192a29ea86b9f47ac3a26bb3f67 jdk-9.0.4+11

View File

@ -1 +1,2 @@
project=jdk9
bugids=dup

View File

@ -0,0 +1,37 @@
ADDITIONAL INFORMATION ABOUT LICENSING
Certain files distributed by Oracle America, Inc. and/or its affiliates are
subject to the following clarification and special exception to the GPLv2,
based on the GNU Project exception for its Classpath libraries, known as the
GNU Classpath Exception.
Note that Oracle includes multiple, independent programs in this software
package. Some of those programs are provided under licenses deemed
incompatible with the GPLv2 by the Free Software Foundation and others.
For example, the package includes programs licensed under the Apache
License, Version 2.0 and may include FreeType. Such programs are licensed
to you under their original licenses.
Oracle facilitates your further distribution of this package by adding the
Classpath Exception to the necessary parts of its GPLv2 code, which permits
you to use that code in combination with other independent modules not
licensed under the GPLv2. However, note that this would not permit you to
commingle code under an incompatible license with Oracle's GPLv2 licensed
code by, for example, cutting and pasting such code into a file also
containing Oracle's GPLv2 licensed code and then distributing the result.
Additionally, if you were to remove the Classpath Exception from any of the
files to which it applies and distribute the result, you would likely be
required to license some or all of the other code in that distribution under
the GPLv2 as well, and since the GPLv2 is incompatible with the license terms
of some items included in the distribution by Oracle, removing the Classpath
Exception could therefore effectively compromise your ability to further
distribute the package.
Failing to distribute notices associated with some files may also create
unexpected legal consequences.
Proceed with caution and we recommend that you obtain the advice of a lawyer
skilled in open source matters before removing the Classpath Exception or
making modifications to this package which may subsequently be redistributed
and/or involve the use of third party software.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2017, 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
@ -26,11 +26,13 @@
package com.sun.corba.se.impl.encoding;
import com.sun.corba.se.impl.orbutil.ORBConstants;
import com.sun.corba.se.impl.orbutil.ORBUtility;
import com.sun.corba.se.impl.encoding.ByteBufferWithInfo;
import com.sun.corba.se.impl.encoding.BufferManagerWrite;
import com.sun.corba.se.pept.encoding.OutputObject;
import com.sun.corba.se.pept.transport.Connection;
import com.sun.corba.se.spi.orb.ORB;
import com.sun.corba.se.spi.orb.ORBData;
public class BufferManagerWriteGrow extends BufferManagerWrite
{
@ -48,7 +50,20 @@ public class BufferManagerWriteGrow extends BufferManagerWrite
* buffer manager as set in the ORB.
*/
public int getBufferSize() {
return orb.getORBData().getGIOPBufferSize();
ORBData orbData = null;
int bufferSize = ORBConstants.GIOP_DEFAULT_BUFFER_SIZE;
if (orb != null) {
orbData = orb.getORBData();
if (orbData != null) {
bufferSize = orbData.getGIOPBufferSize();
dprint("BufferManagerWriteGrow.getBufferSize: bufferSize == " + bufferSize);
} else {
dprint("BufferManagerWriteGrow.getBufferSize: orbData reference is NULL");
}
} else {
dprint("BufferManagerWriteGrow.getBufferSize: orb reference is NULL");
}
return bufferSize;
}
public void overflow (ByteBufferWithInfo bbwi)
@ -89,4 +104,9 @@ public class BufferManagerWriteGrow extends BufferManagerWrite
*/
public void close() {}
private void dprint(String msg) {
if (orb.transportDebugFlag) {
ORBUtility.dprint(this, msg);
}
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2017, 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
@ -725,12 +725,14 @@ public class CDRInputStream_1_0 extends CDRInputStreamBase
// IDLEntity.class.isAssignableFrom( clz ).
// 3. If clz is an interface, use it to create the appropriate
// stub factory.
public org.omg.CORBA.Object read_Object(Class clz)
{
// In any case, we must first read the IOR.
IOR ior = IORFactories.makeIOR(parent) ;
if (ior.isNil())
if (ior.isNil()) {
return null ;
}
PresentationManager.StubFactoryFactory sff = ORB.getStubFactoryFactory() ;
String codeBase = ior.getProfile().getCodebase() ;
@ -739,6 +741,7 @@ public class CDRInputStream_1_0 extends CDRInputStreamBase
if (clz == null) {
RepositoryId rid = RepositoryId.cache.getId( ior.getTypeId() ) ;
String className = rid.getClassName() ;
orb.validateIORClass(className);
boolean isIDLInterface = rid.isIDLType() ;
if (className == null || className.equals( "" ))
@ -761,11 +764,9 @@ public class CDRInputStream_1_0 extends CDRInputStreamBase
} else {
// clz is an interface class
boolean isIDL = IDLEntity.class.isAssignableFrom( clz ) ;
stubFactory = sff.createStubFactory( clz.getName(),
isIDL, codeBase, clz, clz.getClassLoader() ) ;
}
return internalIORToObject( ior, stubFactory, orb ) ;
}

View File

@ -38,7 +38,10 @@ import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.DigestOutputStream;
import java.security.AccessController;
import java.security.PermissionCollection;
import java.security.Permissions;
import java.security.PrivilegedAction;
import java.security.ProtectionDomain;
import java.lang.reflect.Modifier;
import java.lang.reflect.Field;
@ -57,6 +60,8 @@ import java.io.Serializable;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashSet;
import java.util.Set;
import com.sun.corba.se.impl.util.RepositoryId;
@ -443,6 +448,65 @@ public class ObjectStreamClass implements java.io.Serializable {
private static final PersistentFieldsValue persistentFieldsValue =
new PersistentFieldsValue();
/**
* Creates a PermissionDomain that grants no permission.
*/
private ProtectionDomain noPermissionsDomain() {
PermissionCollection perms = new Permissions();
perms.setReadOnly();
return new ProtectionDomain(null, perms);
}
/**
* Aggregate the ProtectionDomains of all the classes that separate
* a concrete class {@code cl} from its ancestor's class declaring
* a constructor {@code cons}.
*
* If {@code cl} is defined by the boot loader, or the constructor
* {@code cons} is declared by {@code cl}, or if there is no security
* manager, then this method does nothing and {@code null} is returned.
*
* @param cons A constructor declared by {@code cl} or one of its
* ancestors.
* @param cl A concrete class, which is either the class declaring
* the constructor {@code cons}, or a serializable subclass
* of that class.
* @return An array of ProtectionDomain representing the set of
* ProtectionDomain that separate the concrete class {@code cl}
* from its ancestor's declaring {@code cons}, or {@code null}.
*/
private ProtectionDomain[] getProtectionDomains(Constructor<?> cons,
Class<?> cl) {
ProtectionDomain[] domains = null;
if (cons != null && cl.getClassLoader() != null
&& System.getSecurityManager() != null) {
Class<?> cls = cl;
Class<?> fnscl = cons.getDeclaringClass();
Set<ProtectionDomain> pds = null;
while (cls != fnscl) {
ProtectionDomain pd = cls.getProtectionDomain();
if (pd != null) {
if (pds == null) pds = new HashSet<>();
pds.add(pd);
}
cls = cls.getSuperclass();
if (cls == null) {
// that's not supposed to happen
// make a ProtectionDomain with no permission.
// should we throw instead?
if (pds == null) pds = new HashSet<>();
else pds.clear();
pds.add(noPermissionsDomain());
break;
}
}
if (pds != null) {
domains = pds.toArray(new ProtectionDomain[0]);
}
}
return domains;
}
/*
* Initialize class descriptor. This method is only invoked on class
* descriptors created via calls to lookupInternal(). This method is kept
@ -568,11 +632,15 @@ public class ObjectStreamClass implements java.io.Serializable {
readResolveObjectMethod = bridge.readResolveForSerialization(cl);
domains = new ProtectionDomain[] {noPermissionsDomain()};
if (externalizable)
cons = getExternalizableConstructor(cl) ;
else
cons = getSerializableConstructor(cl) ;
domains = getProtectionDomains(cons, cl);
if (serializable && !forProxyClass) {
writeObjectMethod = bridge.writeObjectForSerialization(cl) ;
readObjectMethod = bridge.readObjectForSerialization(cl);
@ -910,7 +978,7 @@ public class ObjectStreamClass implements java.io.Serializable {
{
if (cons != null) {
try {
return cons.newInstance();
return bridge.newInstanceForSerialization(cons, domains);
} catch (IllegalAccessException ex) {
// should not occur, as access checks have been suppressed
InternalError ie = new InternalError();
@ -1506,6 +1574,7 @@ public class ObjectStreamClass implements java.io.Serializable {
private transient MethodHandle writeReplaceObjectMethod;
private transient MethodHandle readResolveObjectMethod;
private transient Constructor<?> cons;
private transient ProtectionDomain[] domains;
/**
* Beginning in Java to IDL ptc/02-01-12, RMI-IIOP has a

View File

@ -0,0 +1,179 @@
/*
* Copyright (c) 2017, 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.corba.se.impl.ior;
import java.util.Set;
import com.sun.corba.se.impl.orbutil.ORBUtility;
import com.sun.corba.se.spi.ior.IORTypeCheckRegistry;
import com.sun.corba.se.spi.orb.ORB;
public class IORTypeCheckRegistryImpl implements IORTypeCheckRegistry {
private final Set<String> iorTypeNames;
private static final Set<String> builtinIorTypeNames;
private ORB theOrb;
static {
builtinIorTypeNames = initBuiltinIorTypeNames();
}
public IORTypeCheckRegistryImpl( String filterProperties, ORB orb) {
theOrb = orb;
iorTypeNames = parseIorClassNameList(filterProperties);
}
/*
*
* A note on the validation flow:
* 1. against the filter class name list
* 2. against the builtin class name list
*/
@Override
public boolean isValidIORType(String iorClassName) {
dprintTransport(".isValidIORType : iorClassName == " + iorClassName);
return validateIorTypeByName(iorClassName);
}
private boolean validateIorTypeByName(String iorClassName) {
dprintTransport(".validateIorTypeByName : iorClassName == " + iorClassName);
boolean isValidType;
isValidType = checkIorTypeNames(iorClassName);
if (!isValidType) {
isValidType = checkBuiltinClassNames(iorClassName);
}
dprintTransport(".validateIorTypeByName : isValidType == " + isValidType);
return isValidType;
}
/*
* check if the class name corresponding to an IOR Type name
* is in the ior class name list as generated from the filter property.
* So if the IOR type is recorded in the registry then allow the creation of the
* stub factory and let it resolve and load the class. That is if current
* type check deliberation permits.
* IOR Type names are configured by the filter property
*/
private boolean checkIorTypeNames(
String theIorClassName) {
return (iorTypeNames != null) && (iorTypeNames.contains(theIorClassName));
}
/*
* Check the IOR interface class name against the set of
* class names that correspond to the builtin JDK IDL stub classes.
*/
private boolean checkBuiltinClassNames(
String theIorClassName) {
return builtinIorTypeNames.contains(theIorClassName);
}
private Set<String> parseIorClassNameList(String filterProperty) {
Set<String> _iorTypeNames = null;
if (filterProperty != null) {
String[] tempIorClassNames = filterProperty.split(";");
_iorTypeNames = Set.<String>of(tempIorClassNames);
if (theOrb.orbInitDebugFlag) {
dprintConfiguredIorTypeNames();
}
}
return _iorTypeNames;
}
private static Set<String> initBuiltinIorTypeNames() {
Set<Class<?>> builtInCorbaStubTypes = initBuiltInCorbaStubTypes();
String [] tempBuiltinIorTypeNames = new String[builtInCorbaStubTypes.size()];
int i = 0;
for (Class<?> _stubClass: builtInCorbaStubTypes) {
tempBuiltinIorTypeNames[i++] = _stubClass.getName();
}
return Set.<String>of(tempBuiltinIorTypeNames);
}
private static Set<Class<?>> initBuiltInCorbaStubTypes() {
Class<?> tempBuiltinCorbaStubTypes[] = {
com.sun.corba.se.spi.activation.Activator.class,
com.sun.corba.se.spi.activation._ActivatorStub.class,
com.sun.corba.se.spi.activation._InitialNameServiceStub.class,
com.sun.corba.se.spi.activation._LocatorStub.class,
com.sun.corba.se.spi.activation._RepositoryStub.class,
com.sun.corba.se.spi.activation._ServerManagerStub.class,
com.sun.corba.se.spi.activation._ServerStub.class,
org.omg.CosNaming.BindingIterator.class,
org.omg.CosNaming._BindingIteratorStub.class,
org.omg.CosNaming.NamingContextExt.class,
org.omg.CosNaming._NamingContextExtStub.class,
org.omg.CosNaming.NamingContext.class,
org.omg.CosNaming._NamingContextStub.class,
org.omg.DynamicAny.DynAnyFactory.class,
org.omg.DynamicAny._DynAnyFactoryStub.class,
org.omg.DynamicAny.DynAny.class,
org.omg.DynamicAny._DynAnyStub.class,
org.omg.DynamicAny.DynArray.class,
org.omg.DynamicAny._DynArrayStub.class,
org.omg.DynamicAny.DynEnum.class,
org.omg.DynamicAny._DynEnumStub.class,
org.omg.DynamicAny.DynFixed.class,
org.omg.DynamicAny._DynFixedStub.class,
org.omg.DynamicAny.DynSequence.class,
org.omg.DynamicAny._DynSequenceStub.class,
org.omg.DynamicAny.DynStruct.class,
org.omg.DynamicAny._DynStructStub.class,
org.omg.DynamicAny.DynUnion.class,
org.omg.DynamicAny._DynUnionStub.class,
org.omg.DynamicAny._DynValueStub.class,
org.omg.DynamicAny.DynValue.class,
org.omg.PortableServer.ServantActivator.class,
org.omg.PortableServer._ServantActivatorStub.class,
org.omg.PortableServer.ServantLocator.class,
org.omg.PortableServer._ServantLocatorStub.class };
return Set.<Class<?>>of(tempBuiltinCorbaStubTypes);
}
private void dprintConfiguredIorTypeNames() {
if (iorTypeNames != null) {
for (String iorTypeName : iorTypeNames) {
ORBUtility.dprint(this, ".dprintConfiguredIorTypeNames: " + iorTypeName);
}
}
}
private void dprintTransport(String msg) {
if (theOrb.transportDebugFlag) {
ORBUtility.dprint(this, msg);
}
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2017, 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
@ -54,6 +54,7 @@ import java.net.InetAddress;
import java.security.PrivilegedAction;
import java.security.AccessController;
import java.security.Security;
import javax.rmi.CORBA.Util;
import javax.rmi.CORBA.ValueHandler;
@ -90,6 +91,7 @@ import com.sun.corba.se.pept.transport.ConnectionCache;
import com.sun.corba.se.pept.transport.TransportManager;
import com.sun.corba.se.spi.ior.IOR;
import com.sun.corba.se.spi.ior.IORTypeCheckRegistry;
import com.sun.corba.se.spi.ior.IdentifiableFactoryFinder;
import com.sun.corba.se.spi.ior.TaggedComponentFactoryFinder;
import com.sun.corba.se.spi.ior.IORFactories;
@ -124,6 +126,7 @@ import com.sun.corba.se.spi.orb.StringPair;
import com.sun.corba.se.spi.transport.CorbaContactInfoListFactory;
import com.sun.corba.se.spi.transport.CorbaTransportManager;
import com.sun.corba.se.spi.legacy.connection.LegacyServerSocketManager;
import com.sun.corba.se.spi.logging.CORBALogDomains;
import com.sun.corba.se.spi.copyobject.CopierManager;
import com.sun.corba.se.spi.presentation.rmi.PresentationDefaults;
import com.sun.corba.se.spi.presentation.rmi.PresentationManager;
@ -145,6 +148,7 @@ import com.sun.corba.se.impl.encoding.EncapsOutputStream;
import com.sun.corba.se.impl.encoding.CachedCodeBase;
import com.sun.corba.se.impl.interceptors.PIHandlerImpl;
import com.sun.corba.se.impl.interceptors.PINoOpHandlerImpl;
import com.sun.corba.se.impl.ior.IORTypeCheckRegistryImpl;
import com.sun.corba.se.impl.ior.TaggedComponentFactoryFinderImpl;
import com.sun.corba.se.impl.ior.TaggedProfileFactoryFinderImpl;
import com.sun.corba.se.impl.ior.TaggedProfileTemplateFactoryFinderImpl;
@ -226,6 +230,8 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
private ServiceContextRegistry serviceContextRegistry ;
private IORTypeCheckRegistry iorTypeCheckRegistry;
// Needed here to implement connect/disconnect
private TOAFactory toaFactory ;
@ -274,6 +280,8 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
// insNamingDelegate.
private final Object resolverLock = new Object() ;
private static final String IORTYPECHECKREGISTRY_FILTER_PROPNAME = "com.sun.CORBA.ORBIorTypeCheckRegistryFilter";
private TaggedComponentFactoryFinder taggedComponentFactoryFinder ;
private IdentifiableFactoryFinder taggedProfileFactoryFinder ;
@ -411,6 +419,39 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
};
serviceContextRegistry = new ServiceContextRegistry( this ) ;
}
private void initIORTypeCheckRegistry() {
String filterProps = AccessController
.doPrivileged(new PrivilegedAction<String>() {
public String run() {
String props = System
.getProperty(IORTYPECHECKREGISTRY_FILTER_PROPNAME);
if (props == null) {
props = Security
.getProperty(IORTYPECHECKREGISTRY_FILTER_PROPNAME);
}
return props;
}
});
if (filterProps != null) {
try {
iorTypeCheckRegistry = new IORTypeCheckRegistryImpl(filterProps, this);
} catch (Exception ex) {
throw wrapper.bootstrapException(ex);
}
if (this.orbInitDebugFlag) {
dprint(".initIORTypeCheckRegistry, IORTypeCheckRegistryImpl created for properties == "
+ filterProps);
}
} else {
if (this.orbInitDebugFlag) {
dprint(".initIORTypeCheckRegistry, IORTypeCheckRegistryImpl NOT created for properties == ");
}
}
}
protected void setDebugFlags( String[] args )
@ -494,6 +535,8 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
getThreadPoolManager();
super.getByteBufferPool();
initIORTypeCheckRegistry();
}
private synchronized POAFactory getPOAFactory()
@ -2089,6 +2132,17 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
}
return copierManager ;
}
@Override
public void validateIORClass(String iorClassName) {
if (iorTypeCheckRegistry != null) {
if (!iorTypeCheckRegistry.isValidIORType(iorClassName)) {
throw ORBUtilSystemException.get( this,
CORBALogDomains.OA_IOR ).badStringifiedIor();
}
}
}
} // Class ORBImpl
////////////////////////////////////////////////////////////////////////

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2017, 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
@ -768,6 +768,13 @@ public class ORBSingleton extends ORB
public CopierManager getCopierManager() {
return null ;
}
@Override
public void validateIORClass(String iorClassName) {
getFullORB().validateIORClass(iorClassName);
}
}
// End of file.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 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
@ -22,21 +22,10 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package jdk.internal.misc;
import java.io.ObjectStreamClass;
package com.sun.corba.se.spi.ior;
/**
* A callback used by {@code ObjectInputStream} to do descriptor validation.
*
* @author sjiang
*/
public interface ObjectStreamClassValidator {
/**
* This method will be called by ObjectInputStream to
* check a descriptor just before creating an object described by this descriptor.
* The object will not be created if this method throws a {@code RuntimeException}.
* @param descriptor descriptor to be checked.
*/
public void validateDescriptor(ObjectStreamClass descriptor);
public interface IORTypeCheckRegistry {
public boolean isValidIORType(String iorClassName);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2017, 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
@ -121,6 +121,7 @@ public abstract class ORB extends com.sun.corba.se.org.omg.CORBA.ORB
public boolean shutdownDebugFlag = false;
public boolean giopDebugFlag = false;
public boolean invocationTimingDebugFlag = false ;
public boolean orbInitDebugFlag = false ;
// SystemException log wrappers. Protected so that they can be used in
// subclasses.
@ -487,6 +488,24 @@ public abstract class ORB extends com.sun.corba.se.org.omg.CORBA.ORB
public abstract ThreadPoolManager getThreadPoolManager();
public abstract CopierManager getCopierManager() ;
/*
* This method is called to verify that a stringified IOR passed to
* an org.omg.CORBA.ORB::string_to_object method contains a valid and acceptable IOR type.
* If an ORB is configured with IOR type checking enabled,
* the ORB executes a IOR type registry lookup to
* validate that the class name extract from a type id in
* a stringified IOR is a known and accepted type.
* A CORBA {@code org.omg.CORBA.DATA_CONVERSION} exception will be thrown should the type check fail.
*
* @param iorClassName
* a string representing the class name corresponding to the type id of an IOR
* @throws org.omg.CORBA.DATA_CONVERSION
* exception with an indication that it is a "Bad stringified IOR", which is thrown
* when the type check fails.
*/
public abstract void validateIORClass(String iorClassName);
}
// End of file.

View File

@ -27,8 +27,9 @@ package sun.corba ;
import java.io.OptionalDataException;
import java.lang.invoke.MethodHandle;
import java.lang.reflect.Field ;
import java.lang.reflect.Constructor ;
import java.lang.reflect.Field;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.lang.StackWalker;
import java.lang.StackWalker.StackFrame;
import java.util.Optional;
@ -37,6 +38,7 @@ import java.util.stream.Stream;
import java.security.AccessController;
import java.security.Permission;
import java.security.PrivilegedAction;
import java.security.ProtectionDomain;
import sun.misc.Unsafe;
import sun.reflect.ReflectionFactory;
@ -340,6 +342,36 @@ public final class Bridge
return reflectionFactory.newConstructorForExternalization( cl ) ;
}
/**
* Invokes the supplied constructor, adding the provided protection domains
* to the invocation stack before invoking {@code Constructor::newInstance}.
*
* This is equivalent to calling
* {@code ReflectionFactory.newInstanceForSerialization(cons,domains)}.
*
* @param cons A constructor obtained from {@code
* newConstructorForSerialization} or {@code
* newConstructorForExternalization}.
*
* @param domains An array of protection domains that limit the privileges
* with which the constructor is invoked. Can be {@code null}
* or empty, in which case privileges are only limited by the
* {@linkplain AccessController#getContext() current context}.
*
* @return A new object built from the provided constructor.
*
* @throws NullPointerException if {@code cons} is {@code null}.
* @throws InstantiationException if thrown by {@code cons.newInstance()}.
* @throws InvocationTargetException if thrown by {@code cons.newInstance()}.
* @throws IllegalAccessException if thrown by {@code cons.newInstance()}.
*/
public final Object newInstanceForSerialization(Constructor<?> cons,
ProtectionDomain[] domains)
throws InstantiationException, InvocationTargetException, IllegalAccessException
{
return reflectionFactory.newInstanceForSerialization(cons, domains);
}
/**
* Returns true if the given class defines a static initializer method,
* false otherwise.

View File

@ -577,9 +577,35 @@ d53171650a2cc6c6f699c966c533b914ca9c0602 jdk-9+171
1ae9e84f68b359420d2d153ecfe5ee2903e33a2e jdk-9+172
e64b1cb48d6e7703928a9d1da106fc27f8cb65fd jdk-9+173
944791f8160185bffa13fbb821fc09b6198f1f25 jdk-9+174
ca47dcfdd35129fe3ab2dab71b2601d7a0ff07c0 jdk-9.0.1+00
ca47dcfdd35129fe3ab2dab71b2601d7a0ff07c0 jdk-9.0.3+00
8f04d457168b9f1f4a1b2c37f49e0513ca9d33a7 jdk-9+175
2ab74e5dbdc2b6a962c865500cafd23cf387dc60 jdk-9+176
1ca8f038fceb88c640badf9bd18905205bc63b43 jdk-9+177
9d032191f82fca5ba0aac98682f69c4ff0f1283d jdk-9+178
d2661aa42bff322badbe6c1337fc638d2e0f5730 jdk-9+179
d7baadc223e790c08bc69bf7e553bce65b4e7e40 jdk-9+180
4a443796f6f57842d6a0434ac27ca3d1033ccc20 jdk-9+181
8297b62a7b62bafe42c7d567a5752f7a82bafab8 jdk-9.0.3+1
d2efdbb193a02613867c8949f783d2905f7a28fc jdk-9.0.3+2
68f9ff7c5eedfd41f9c10959e41024efbd3aa79c jdk-9.0.3+3
82584ea6464de2e0a59e9fc00173e18a85dc45d8 jdk-9.0.3+4
c45e75533bae7b5db5c626bf9233b4226934d582 jdk-9.0.3+5
4c0248d117fabf46c5931cdd09e543c3d89b68a5 jdk-9.0.3+6
fca264c9fa3ce57b3f4d662242d38b44fb442c87 jdk-9.0.3+7
1f5a9c0ddb4b8da443f70fc5d135b320f6e0b78a jdk-9.0.3+8
a10c11fed5bdc5202523baee3cf391cc0e0cfcaa jdk-9.0.3+9
172baf6c99c5e9fdd72a6f3729f6ec8cd6b48183 jdk-9.0.1+10
3546eb2ee2693043eb107d980ce5b72fe7f8f47a jdk-9.0.1+11
5be37d3ef648d06850aa164d8b22ac7539559e80 jdk-9.0.4+00
46290b7298be50f9a70d27465d50d1675732f0af jdk-9.0.4+1
dab4c60adabfb8ea35cfcd96a7218994a84d652f jdk-9.0.4+2
deed95e4b4cba997b3cc13b62e33615fd11bc902 jdk-9.0.4+3
ce49d719fd4d5f0ff12a1906d9d8b651a7a7d60c jdk-9.0.4+4
11116cc619ac1b0d00cdcd47e8a7eb2339207bbf jdk-9.0.4+5
f3ba0e190ffcc82f1ed0dd8275a51096123514b6 jdk-9.0.4+6
e020892c9b441ff0855479ad4de63a9eb4b59bf7 jdk-9.0.4+7
d74a282dcd6d05cc3752c8e29a526eb9216fa08c jdk-9.0.4+8
a825ddfdd78e3277e6275a469f3cd2be23759c13 jdk-9.0.4+9
a8e5681c2532b4d21567bbee5d3dd42027118e72 jdk-9.0.4+10
f6418daf023ea194db63519e3d13ca6c252028ed jdk-9.0.4+11

View File

@ -1 +1,2 @@
project=jdk9
bugids=dup

View File

@ -0,0 +1,37 @@
ADDITIONAL INFORMATION ABOUT LICENSING
Certain files distributed by Oracle America, Inc. and/or its affiliates are
subject to the following clarification and special exception to the GPLv2,
based on the GNU Project exception for its Classpath libraries, known as the
GNU Classpath Exception.
Note that Oracle includes multiple, independent programs in this software
package. Some of those programs are provided under licenses deemed
incompatible with the GPLv2 by the Free Software Foundation and others.
For example, the package includes programs licensed under the Apache
License, Version 2.0 and may include FreeType. Such programs are licensed
to you under their original licenses.
Oracle facilitates your further distribution of this package by adding the
Classpath Exception to the necessary parts of its GPLv2 code, which permits
you to use that code in combination with other independent modules not
licensed under the GPLv2. However, note that this would not permit you to
commingle code under an incompatible license with Oracle's GPLv2 licensed
code by, for example, cutting and pasting such code into a file also
containing Oracle's GPLv2 licensed code and then distributing the result.
Additionally, if you were to remove the Classpath Exception from any of the
files to which it applies and distribute the result, you would likely be
required to license some or all of the other code in that distribution under
the GPLv2 as well, and since the GPLv2 is incompatible with the license terms
of some items included in the distribution by Oracle, removing the Classpath
Exception could therefore effectively compromise your ability to further
distribute the package.
Failing to distribute notices associated with some files may also create
unexpected legal consequences.
Proceed with caution and we recommend that you obtain the advice of a lawyer
skilled in open source matters before removing the Classpath Exception or
making modifications to this package which may subsequently be redistributed
and/or involve the use of third party software.

View File

@ -927,8 +927,12 @@ void MacroAssembler::lookup_interface_method(Register recv_klass,
RegisterOrConstant itable_index,
Register method_result,
Register scan_temp,
Label& L_no_such_interface) {
assert_different_registers(recv_klass, intf_klass, method_result, scan_temp);
Label& L_no_such_interface,
bool return_method) {
assert_different_registers(recv_klass, intf_klass, scan_temp);
assert_different_registers(method_result, intf_klass, scan_temp);
assert(recv_klass != method_result || !return_method,
"recv_klass can be destroyed when method isn't needed");
assert(itable_index.is_constant() || itable_index.as_register() == method_result,
"caller must use same register for non-constant itable index as for method");
@ -946,12 +950,14 @@ void MacroAssembler::lookup_interface_method(Register recv_klass,
lea(scan_temp, Address(recv_klass, scan_temp, Address::lsl(3)));
add(scan_temp, scan_temp, vtable_base);
// Adjust recv_klass by scaled itable_index, so we can free itable_index.
assert(itableMethodEntry::size() * wordSize == wordSize, "adjust the scaling in the code below");
// lea(recv_klass, Address(recv_klass, itable_index, Address::times_ptr, itentry_off));
lea(recv_klass, Address(recv_klass, itable_index, Address::lsl(3)));
if (itentry_off)
add(recv_klass, recv_klass, itentry_off);
if (return_method) {
// Adjust recv_klass by scaled itable_index, so we can free itable_index.
assert(itableMethodEntry::size() * wordSize == wordSize, "adjust the scaling in the code below");
// lea(recv_klass, Address(recv_klass, itable_index, Address::times_ptr, itentry_off));
lea(recv_klass, Address(recv_klass, itable_index, Address::lsl(3)));
if (itentry_off)
add(recv_klass, recv_klass, itentry_off);
}
// for (scan = klass->itable(); scan->interface() != NULL; scan += scan_step) {
// if (scan->interface() == intf) {
@ -985,8 +991,10 @@ void MacroAssembler::lookup_interface_method(Register recv_klass,
bind(found_method);
// Got a hit.
ldr(scan_temp, Address(scan_temp, itableOffsetEntry::offset_offset_in_bytes()));
ldr(method_result, Address(recv_klass, scan_temp));
if (return_method) {
ldrw(scan_temp, Address(scan_temp, itableOffsetEntry::offset_offset_in_bytes()));
ldr(method_result, Address(recv_klass, scan_temp, Address::uxtw(0)));
}
}
// virtual method calling
@ -1005,7 +1013,8 @@ void MacroAssembler::lookup_virtual_method(Register recv_klass,
ldr(method_result, Address(method_result, vtable_offset_in_bytes));
} else {
vtable_offset_in_bytes += vtable_index.as_constant() * wordSize;
ldr(method_result, Address(recv_klass, vtable_offset_in_bytes));
ldr(method_result,
form_address(rscratch1, recv_klass, vtable_offset_in_bytes, 0));
}
}

View File

@ -870,7 +870,8 @@ public:
RegisterOrConstant itable_index,
Register method_result,
Register scan_temp,
Label& no_such_interface);
Label& no_such_interface,
bool return_method = true);
// virtual method calling
// n.b. x86 allows RegisterOrConstant for vtable_index

View File

@ -773,7 +773,7 @@ AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm
__ load_klass(rscratch1, receiver);
__ ldr(tmp, Address(holder, CompiledICHolder::holder_klass_offset()));
__ cmp(rscratch1, tmp);
__ ldr(rmethod, Address(holder, CompiledICHolder::holder_method_offset()));
__ ldr(rmethod, Address(holder, CompiledICHolder::holder_metadata_offset()));
__ br(Assembler::EQ, ok);
__ far_jump(RuntimeAddress(SharedRuntime::get_ic_miss_stub()));

View File

@ -3279,11 +3279,11 @@ void TemplateTable::invokeinterface(int byte_no) {
transition(vtos, vtos);
assert(byte_no == f1_byte, "use this argument");
prepare_invoke(byte_no, r0, rmethod, // get f1 Klass*, f2 itable index
prepare_invoke(byte_no, r0, rmethod, // get f1 Klass*, f2 Method*
r2, r3); // recv, flags
// r0: interface klass (from f1)
// rmethod: itable index (from f2)
// rmethod: method (from f2)
// r2: receiver
// r3: flags
@ -3302,10 +3302,27 @@ void TemplateTable::invokeinterface(int byte_no) {
__ null_check(r2, oopDesc::klass_offset_in_bytes());
__ load_klass(r3, r2);
Label no_such_interface, no_such_method;
// Receiver subtype check against REFC.
// Superklass in r0. Subklass in r3. Blows rscratch2, r13
__ lookup_interface_method(// inputs: rec. class, interface, itable index
r3, r0, noreg,
// outputs: scan temp. reg, scan temp. reg
rscratch2, r13,
no_such_interface,
/*return_method=*/false);
// profile this call
__ profile_virtual_call(r3, r13, r19);
Label no_such_interface, no_such_method;
// Get declaring interface class from method, and itable index
__ ldr(r0, Address(rmethod, Method::const_offset()));
__ ldr(r0, Address(r0, ConstMethod::constants_offset()));
__ ldr(r0, Address(r0, ConstantPool::pool_holder_offset_in_bytes()));
__ ldrw(rmethod, Address(rmethod, Method::itable_index_offset()));
__ subw(rmethod, rmethod, Method::itable_index_max);
__ negw(rmethod, rmethod);
__ lookup_interface_method(// inputs: rec. class, interface, itable index
r3, r0, rmethod,

View File

@ -29,6 +29,7 @@
#include "code/vtableStubs.hpp"
#include "interp_masm_aarch64.hpp"
#include "memory/resourceArea.hpp"
#include "oops/compiledICHolder.hpp"
#include "oops/instanceKlass.hpp"
#include "oops/klassVtable.hpp"
#include "runtime/sharedRuntime.hpp"
@ -62,8 +63,8 @@ VtableStub* VtableStubs::create_vtable_stub(int vtable_index) {
#ifndef PRODUCT
if (CountCompiledCalls) {
__ lea(r19, ExternalAddress((address) SharedRuntime::nof_megamorphic_calls_addr()));
__ incrementw(Address(r19));
__ lea(r16, ExternalAddress((address) SharedRuntime::nof_megamorphic_calls_addr()));
__ incrementw(Address(r16));
}
#endif
@ -72,13 +73,13 @@ VtableStub* VtableStubs::create_vtable_stub(int vtable_index) {
// get receiver klass
address npe_addr = __ pc();
__ load_klass(r19, j_rarg0);
__ load_klass(r16, j_rarg0);
#ifndef PRODUCT
if (DebugVtables) {
Label L;
// check offset vs vtable length
__ ldrw(rscratch1, Address(r19, Klass::vtable_length_offset()));
__ ldrw(rscratch1, Address(r16, Klass::vtable_length_offset()));
__ cmpw(rscratch1, vtable_index * vtableEntry::size());
__ br(Assembler::GT, L);
__ enter();
@ -90,7 +91,7 @@ VtableStub* VtableStubs::create_vtable_stub(int vtable_index) {
}
#endif // PRODUCT
__ lookup_virtual_method(r19, vtable_index, rmethod);
__ lookup_virtual_method(r16, vtable_index, rmethod);
if (DebugVtables) {
Label L;
@ -140,28 +141,44 @@ VtableStub* VtableStubs::create_itable_stub(int itable_index) {
#endif
// Entry arguments:
// rscratch2: Interface
// rscratch2: CompiledICHolder
// j_rarg0: Receiver
// Free registers (non-args) are r0 (interface), rmethod
// Most registers are in use; we'll use r16, rmethod, r10, r11
const Register recv_klass_reg = r10;
const Register holder_klass_reg = r16; // declaring interface klass (DECC)
const Register resolved_klass_reg = rmethod; // resolved interface klass (REFC)
const Register temp_reg = r11;
const Register icholder_reg = rscratch2;
Label L_no_such_interface;
__ ldr(resolved_klass_reg, Address(icholder_reg, CompiledICHolder::holder_klass_offset()));
__ ldr(holder_klass_reg, Address(icholder_reg, CompiledICHolder::holder_metadata_offset()));
// get receiver (need to skip return address on top of stack)
assert(VtableStub::receiver_location() == j_rarg0->as_VMReg(), "receiver expected in j_rarg0");
// get receiver klass (also an implicit null-check)
address npe_addr = __ pc();
__ load_klass(recv_klass_reg, j_rarg0);
// Most registers are in use; we'll use r0, rmethod, r10, r11
__ load_klass(r10, j_rarg0);
// Receiver subtype check against REFC.
// Destroys recv_klass_reg value.
__ lookup_interface_method(// inputs: rec. class, interface
recv_klass_reg, resolved_klass_reg, noreg,
// outputs: scan temp. reg1, scan temp. reg2
recv_klass_reg, temp_reg,
L_no_such_interface,
/*return_method=*/false);
Label throw_icce;
// Get Method* and entrypoint for compiler
// Get selected method from declaring class and itable index
__ load_klass(recv_klass_reg, j_rarg0); // restore recv_klass_reg
__ lookup_interface_method(// inputs: rec. class, interface, itable index
r10, rscratch2, itable_index,
// outputs: method, scan temp. reg
rmethod, r11,
throw_icce);
recv_klass_reg, holder_klass_reg, itable_index,
// outputs: method, scan temp. reg
rmethod, temp_reg,
L_no_such_interface);
// method (rmethod): Method*
// j_rarg0: receiver
@ -183,7 +200,7 @@ VtableStub* VtableStubs::create_itable_stub(int itable_index) {
__ ldr(rscratch1, Address(rmethod, Method::from_compiled_offset()));
__ br(rscratch1);
__ bind(throw_icce);
__ bind(L_no_such_interface);
__ far_jump(RuntimeAddress(StubRoutines::throw_IncompatibleClassChangeError_entry()));
__ flush();
@ -205,11 +222,11 @@ int VtableStub::pd_code_size_limit(bool is_vtable_stub) {
int size = DebugVtables ? 216 : 0;
if (CountCompiledCalls)
size += 6 * 4;
// FIXME
// FIXME: vtable stubs only need 36 bytes
if (is_vtable_stub)
size += 52;
else
size += 104;
size += 176;
return size;
// In order to tune these parameters, run the JVM with VM options
@ -217,33 +234,58 @@ int VtableStub::pd_code_size_limit(bool is_vtable_stub) {
// actual itable stubs. Run it with -Xmx31G -XX:+UseCompressedOops.
//
// If Universe::narrow_klass_base is nonzero, decoding a compressed
// class can take zeveral instructions. Run it with -Xmx31G
// -XX:+UseCompressedOops.
// class can take zeveral instructions.
//
// The JVM98 app. _202_jess has a megamorphic interface call.
// The itable code looks like this:
// Decoding VtableStub itbl[1]@12
// ldr w10, [x1,#8]
// lsl x10, x10, #3
// ldr w11, [x10,#280]
// add x11, x10, x11, uxtx #3
// add x11, x11, #0x1b8
// ldr x12, [x11]
// cmp x9, x12
// b.eq success
// loop:
// cbz x12, throw_icce
// add x11, x11, #0x10
// ldr x12, [x11]
// cmp x9, x12
// b.ne loop
// success:
// ldr x11, [x11,#8]
// ldr x12, [x10,x11]
// ldr x8, [x12,#72]
// br x8
// throw_icce:
// b throw_ICCE_entry
// ldr xmethod, [xscratch2,#CompiledICHolder::holder_klass_offset]
// ldr x0, [xscratch2]
// ldr w10, [x1,#oopDesc::klass_offset_in_bytes]
// mov xheapbase, #0x3c000000 // #narrow_klass_base
// movk xheapbase, #0x3f7, lsl #32
// add x10, xheapbase, x10
// mov xheapbase, #0xe7ff0000 // #heapbase
// movk xheapbase, #0x3f7, lsl #32
// ldr w11, [x10,#vtable_length_offset]
// add x11, x10, x11, uxtx #3
// add x11, x11, #itableMethodEntry::method_offset_in_bytes
// ldr x10, [x11]
// cmp xmethod, x10
// b.eq found_method
// search:
// cbz x10, no_such_interface
// add x11, x11, #0x10
// ldr x10, [x11]
// cmp xmethod, x10
// b.ne search
// found_method:
// ldr w10, [x1,#oopDesc::klass_offset_in_bytes]
// mov xheapbase, #0x3c000000 // #narrow_klass_base
// movk xheapbase, #0x3f7, lsl #32
// add x10, xheapbase, x10
// mov xheapbase, #0xe7ff0000 // #heapbase
// movk xheapbase, #0x3f7, lsl #32
// ldr w11, [x10,#vtable_length_offset]
// add x11, x10, x11, uxtx #3
// add x11, x11, #itableMethodEntry::method_offset_in_bytes
// add x10, x10, #itentry_off
// ldr xmethod, [x11]
// cmp x0, xmethod
// b.eq found_method2
// search2:
// cbz xmethod, 0x000003ffa872e6cc
// add x11, x11, #0x10
// ldr xmethod, [x11]
// cmp x0, xmethod
// b.ne search2
// found_method2:
// ldr w11, [x11,#itableOffsetEntry::offset_offset_in_bytes]
// ldr xmethod, [x10,w11,uxtw]
// ldr xscratch1, [xmethod,#Method::from_compiled_offset]
// br xscratch1
// no_such_interface:
// b throw_ICCE_entry
}

View File

@ -2475,49 +2475,65 @@ void MacroAssembler::store_sized_value(Register src, Address dst, size_t size_in
// On success, the result will be in method_result, and execution falls through.
// On failure, execution transfers to the given label.
void MacroAssembler::lookup_interface_method(Register Rklass,
Register Rinterf,
Register Rindex,
Register Rintf,
RegisterOrConstant itable_index,
Register method_result,
Register temp_reg1,
Register temp_reg2,
Register Rscan,
Register Rtmp,
Label& L_no_such_interface) {
assert_different_registers(Rklass, Rinterf, temp_reg1, temp_reg2, Rindex);
assert_different_registers(Rklass, Rintf, Rscan, Rtmp);
Register Ritable = temp_reg1;
const int entry_size = itableOffsetEntry::size() * HeapWordSize;
assert(itableOffsetEntry::interface_offset_in_bytes() == 0, "not added for convenience");
// Compute start of first itableOffsetEntry (which is at the end of the vtable)
const int base = in_bytes(Klass::vtable_start_offset());
const int scale = exact_log2(vtableEntry::size_in_bytes());
ldr_s32(temp_reg2, Address(Rklass, Klass::vtable_length_offset())); // Get length of vtable
add(Ritable, Rklass, base);
add(Ritable, Ritable, AsmOperand(temp_reg2, lsl, scale));
ldr_s32(Rtmp, Address(Rklass, Klass::vtable_length_offset())); // Get length of vtable
add(Rscan, Rklass, base);
add(Rscan, Rscan, AsmOperand(Rtmp, lsl, scale));
Label entry, search;
// Search through the itable for an interface equal to incoming Rintf
// itable looks like [intface][offset][intface][offset][intface][offset]
b(entry);
Label loop;
bind(loop);
ldr(Rtmp, Address(Rscan, entry_size, post_indexed));
#ifdef AARCH64
Label found;
cmp(Rtmp, Rintf);
b(found, eq);
cbnz(Rtmp, loop);
#else
cmp(Rtmp, Rintf); // set ZF and CF if interface is found
cmn(Rtmp, 0, ne); // check if tmp == 0 and clear CF if it is
b(loop, ne);
#endif // AARCH64
bind(search);
add(Ritable, Ritable, itableOffsetEntry::size() * HeapWordSize);
#ifdef AARCH64
b(L_no_such_interface);
bind(found);
#else
// CF == 0 means we reached the end of itable without finding icklass
b(L_no_such_interface, cc);
#endif // !AARCH64
bind(entry);
// Check that the entry is non-null. A null entry means that the receiver
// class doesn't implement the interface, and wasn't the same as the
// receiver class checked when the interface was resolved.
ldr(temp_reg2, Address(Ritable, itableOffsetEntry::interface_offset_in_bytes()));
cbz(temp_reg2, L_no_such_interface);
cmp(Rinterf, temp_reg2);
b(search, ne);
ldr_s32(temp_reg2, Address(Ritable, itableOffsetEntry::offset_offset_in_bytes()));
add(temp_reg2, temp_reg2, Rklass); // Add offset to Klass*
assert(itableMethodEntry::size() * HeapWordSize == wordSize, "adjust the scaling in the code below");
assert(itableMethodEntry::method_offset_in_bytes() == 0, "adjust the offset in the code below");
ldr(method_result, Address::indexed_ptr(temp_reg2, Rindex));
if (method_result != noreg) {
// Interface found at previous position of Rscan, now load the method
ldr_s32(Rtmp, Address(Rscan, itableOffsetEntry::offset_offset_in_bytes() - entry_size));
if (itable_index.is_register()) {
add(Rtmp, Rtmp, Rklass); // Add offset to Klass*
assert(itableMethodEntry::size() * HeapWordSize == wordSize, "adjust the scaling in the code below");
assert(itableMethodEntry::method_offset_in_bytes() == 0, "adjust the offset in the code below");
ldr(method_result, Address::indexed_ptr(Rtmp, itable_index.as_register()));
} else {
int method_offset = itableMethodEntry::size() * HeapWordSize * itable_index.as_constant() +
itableMethodEntry::method_offset_in_bytes();
add_slow(method_result, Rklass, method_offset);
ldr(method_result, Address(method_result, Rtmp));
}
}
}
#ifdef COMPILER2

View File

@ -1316,7 +1316,7 @@ public:
void lookup_interface_method(Register recv_klass,
Register intf_klass,
Register itable_index,
RegisterOrConstant itable_index,
Register method_result,
Register temp_reg1,
Register temp_reg2,

View File

@ -987,7 +987,7 @@ AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm
__ load_klass(receiver_klass, receiver);
__ ldr(holder_klass, Address(Ricklass, CompiledICHolder::holder_klass_offset()));
__ ldr(Rmethod, Address(Ricklass, CompiledICHolder::holder_method_offset()));
__ ldr(Rmethod, Address(Ricklass, CompiledICHolder::holder_metadata_offset()));
__ cmp(receiver_klass, holder_klass);
#ifdef AARCH64

View File

@ -4192,7 +4192,7 @@ void TemplateTable::invokeinterface(int byte_no) {
const Register Rflags = R3_tmp;
const Register Rklass = R3_tmp;
prepare_invoke(byte_no, Rinterf, Rindex, Rrecv, Rflags);
prepare_invoke(byte_no, Rinterf, Rmethod, Rrecv, Rflags);
// Special case of invokeinterface called for virtual method of
// java.lang.Object. See cpCacheOop.cpp for details.
@ -4201,56 +4201,39 @@ void TemplateTable::invokeinterface(int byte_no) {
Label notMethod;
__ tbz(Rflags, ConstantPoolCacheEntry::is_forced_virtual_shift, notMethod);
__ mov(Rmethod, Rindex);
invokevirtual_helper(Rmethod, Rrecv, Rflags);
__ bind(notMethod);
// Get receiver klass into Rklass - also a null check
__ load_klass(Rklass, Rrecv);
Label no_such_interface;
// Receiver subtype check against REFC.
__ lookup_interface_method(// inputs: rec. class, interface
Rklass, Rinterf, noreg,
// outputs: scan temp. reg1, scan temp. reg2
noreg, Ritable, Rtemp,
no_such_interface);
// profile this call
__ profile_virtual_call(R0_tmp, Rklass);
// Compute start of first itableOffsetEntry (which is at the end of the vtable)
const int base = in_bytes(Klass::vtable_start_offset());
assert(vtableEntry::size() == 1, "adjust the scaling in the code below");
__ ldr_s32(Rtemp, Address(Rklass, Klass::vtable_length_offset())); // Get length of vtable
__ add(Ritable, Rklass, base);
__ add(Ritable, Ritable, AsmOperand(Rtemp, lsl, LogBytesPerWord));
// Get declaring interface class from method
__ ldr(Rtemp, Address(Rmethod, Method::const_offset()));
__ ldr(Rtemp, Address(Rtemp, ConstMethod::constants_offset()));
__ ldr(Rinterf, Address(Rtemp, ConstantPool::pool_holder_offset_in_bytes()));
Label entry, search, interface_ok;
// Get itable index from method
__ ldr_s32(Rtemp, Address(Rmethod, Method::itable_index_offset()));
__ add(Rtemp, Rtemp, (-Method::itable_index_max)); // small negative constant is too large for an immediate on arm32
__ neg(Rindex, Rtemp);
__ b(entry);
__ bind(search);
__ add(Ritable, Ritable, itableOffsetEntry::size() * HeapWordSize);
__ bind(entry);
// Check that the entry is non-null. A null entry means that the receiver
// class doesn't implement the interface, and wasn't the same as the
// receiver class checked when the interface was resolved.
__ ldr(Rtemp, Address(Ritable, itableOffsetEntry::interface_offset_in_bytes()));
__ cbnz(Rtemp, interface_ok);
// throw exception
__ call_VM(noreg, CAST_FROM_FN_PTR(address,
InterpreterRuntime::throw_IncompatibleClassChangeError));
// the call_VM checks for exception, so we should never return here.
__ should_not_reach_here();
__ bind(interface_ok);
__ cmp(Rinterf, Rtemp);
__ b(search, ne);
__ ldr_s32(Rtemp, Address(Ritable, itableOffsetEntry::offset_offset_in_bytes()));
__ add(Rtemp, Rtemp, Rklass); // Add offset to Klass*
assert(itableMethodEntry::size() == 1, "adjust the scaling in the code below");
__ ldr(Rmethod, Address::indexed_ptr(Rtemp, Rindex));
__ lookup_interface_method(// inputs: rec. class, interface
Rklass, Rinterf, Rindex,
// outputs: scan temp. reg1, scan temp. reg2
Rmethod, Ritable, Rtemp,
no_such_interface);
// Rmethod: Method* to call
@ -4272,6 +4255,13 @@ void TemplateTable::invokeinterface(int byte_no) {
// do the call
__ jump_from_interpreted(Rmethod);
// throw exception
__ bind(no_such_interface);
__ restore_method();
__ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_IncompatibleClassChangeError));
// the call_VM checks for exception, so we should never return here.
__ should_not_reach_here();
}
void TemplateTable::invokehandle(int byte_no) {

View File

@ -28,6 +28,7 @@
#include "code/vtableStubs.hpp"
#include "interp_masm_arm.hpp"
#include "memory/resourceArea.hpp"
#include "oops/compiledICHolder.hpp"
#include "oops/instanceKlass.hpp"
#include "oops/klassVtable.hpp"
#include "runtime/sharedRuntime.hpp"
@ -118,67 +119,48 @@ VtableStub* VtableStubs::create_itable_stub(int itable_index) {
// R0-R3 / R0-R7 registers hold the arguments and cannot be spoiled
const Register Rclass = AARCH64_ONLY(R9) NOT_AARCH64(R4);
const Register Rlength = AARCH64_ONLY(R10) NOT_AARCH64(R5);
const Register Rintf = AARCH64_ONLY(R10) NOT_AARCH64(R5);
const Register Rscan = AARCH64_ONLY(R11) NOT_AARCH64(R6);
const Register tmp = Rtemp;
assert_different_registers(Ricklass, Rclass, Rlength, Rscan, tmp);
assert_different_registers(Ricklass, Rclass, Rintf, Rscan, Rtemp);
// Calculate the start of itable (itable goes after vtable)
const int scale = exact_log2(vtableEntry::size_in_bytes());
address npe_addr = __ pc();
__ load_klass(Rclass, R0);
__ ldr_s32(Rlength, Address(Rclass, Klass::vtable_length_offset()));
__ add(Rscan, Rclass, in_bytes(Klass::vtable_start_offset()));
__ add(Rscan, Rscan, AsmOperand(Rlength, lsl, scale));
Label L_no_such_interface;
// Search through the itable for an interface equal to incoming Ricklass
// itable looks like [intface][offset][intface][offset][intface][offset]
const int entry_size = itableOffsetEntry::size() * HeapWordSize;
assert(itableOffsetEntry::interface_offset_in_bytes() == 0, "not added for convenience");
// Receiver subtype check against REFC.
__ ldr(Rintf, Address(Ricklass, CompiledICHolder::holder_klass_offset()));
__ lookup_interface_method(// inputs: rec. class, interface, itable index
Rclass, Rintf, noreg,
// outputs: temp reg1, temp reg2
noreg, Rscan, Rtemp,
L_no_such_interface);
Label loop;
__ bind(loop);
__ ldr(tmp, Address(Rscan, entry_size, post_indexed));
#ifdef AARCH64
Label found;
__ cmp(tmp, Ricklass);
__ b(found, eq);
__ cbnz(tmp, loop);
#else
__ cmp(tmp, Ricklass); // set ZF and CF if interface is found
__ cmn(tmp, 0, ne); // check if tmp == 0 and clear CF if it is
__ b(loop, ne);
#endif // AARCH64
assert(StubRoutines::throw_IncompatibleClassChangeError_entry() != NULL, "Check initialization order");
#ifdef AARCH64
__ jump(StubRoutines::throw_IncompatibleClassChangeError_entry(), relocInfo::runtime_call_type, tmp);
__ bind(found);
#else
// CF == 0 means we reached the end of itable without finding icklass
__ jump(StubRoutines::throw_IncompatibleClassChangeError_entry(), relocInfo::runtime_call_type, noreg, cc);
#endif // !AARCH64
// Interface found at previous position of Rscan, now load the method oop
__ ldr_s32(tmp, Address(Rscan, itableOffsetEntry::offset_offset_in_bytes() - entry_size));
{
const int method_offset = itableMethodEntry::size() * HeapWordSize * itable_index +
itableMethodEntry::method_offset_in_bytes();
__ add_slow(Rmethod, Rclass, method_offset);
}
__ ldr(Rmethod, Address(Rmethod, tmp));
// Get Method* and entry point for compiler
__ ldr(Rintf, Address(Ricklass, CompiledICHolder::holder_metadata_offset()));
__ lookup_interface_method(// inputs: rec. class, interface, itable index
Rclass, Rintf, itable_index,
// outputs: temp reg1, temp reg2, temp reg3
Rmethod, Rscan, Rtemp,
L_no_such_interface);
address ame_addr = __ pc();
#ifdef AARCH64
__ ldr(tmp, Address(Rmethod, Method::from_compiled_offset()));
__ br(tmp);
__ ldr(Rtemp, Address(Rmethod, Method::from_compiled_offset()));
__ br(Rtemp);
#else
__ ldr(PC, Address(Rmethod, Method::from_compiled_offset()));
#endif // AARCH64
__ bind(L_no_such_interface);
assert(StubRoutines::throw_IncompatibleClassChangeError_entry() != NULL, "check initialization order");
__ jump(StubRoutines::throw_IncompatibleClassChangeError_entry(), relocInfo::runtime_call_type, Rtemp);
masm->flush();
if (PrintMiscellaneous && (WizardMode || Verbose)) {
@ -205,7 +187,7 @@ int VtableStub::pd_code_size_limit(bool is_vtable_stub) {
instr_count = NOT_AARCH64(4) AARCH64_ONLY(5);
} else {
// itable stub size
instr_count = NOT_AARCH64(20) AARCH64_ONLY(20);
instr_count = NOT_AARCH64(31) AARCH64_ONLY(31);
}
#ifdef AARCH64

View File

@ -1786,11 +1786,10 @@ void MacroAssembler::lookup_interface_method(Register recv_klass,
RegisterOrConstant itable_index,
Register method_result,
Register scan_temp,
Register sethi_temp,
Label& L_no_such_interface) {
Register temp2,
Label& L_no_such_interface,
bool return_method) {
assert_different_registers(recv_klass, intf_klass, method_result, scan_temp);
assert(itable_index.is_constant() || itable_index.as_register() == method_result,
"caller must use same register for non-constant itable index as for method");
// Compute start of first itableOffsetEntry (which is at the end of the vtable).
int vtable_base = in_bytes(Klass::vtable_start_offset());
@ -1808,15 +1807,17 @@ void MacroAssembler::lookup_interface_method(Register recv_klass,
add(scan_temp, recv_klass, scan_temp);
// Adjust recv_klass by scaled itable_index, so we can free itable_index.
if (itable_index.is_register()) {
Register itable_offset = itable_index.as_register();
sldi(itable_offset, itable_offset, logMEsize);
if (itentry_off) addi(itable_offset, itable_offset, itentry_off);
add(recv_klass, itable_offset, recv_klass);
} else {
long itable_offset = (long)itable_index.as_constant();
load_const_optimized(sethi_temp, (itable_offset<<logMEsize)+itentry_off); // static address, no relocation
add(recv_klass, sethi_temp, recv_klass);
if (return_method) {
if (itable_index.is_register()) {
Register itable_offset = itable_index.as_register();
sldi(method_result, itable_offset, logMEsize);
if (itentry_off) { addi(method_result, method_result, itentry_off); }
add(method_result, method_result, recv_klass);
} else {
long itable_offset = (long)itable_index.as_constant();
// static address, no relocation
add_const_optimized(method_result, recv_klass, (itable_offset << logMEsize) + itentry_off, temp2);
}
}
// for (scan = klass->itable(); scan->interface() != NULL; scan += scan_step) {
@ -1829,12 +1830,12 @@ void MacroAssembler::lookup_interface_method(Register recv_klass,
for (int peel = 1; peel >= 0; peel--) {
// %%%% Could load both offset and interface in one ldx, if they were
// in the opposite order. This would save a load.
ld(method_result, itableOffsetEntry::interface_offset_in_bytes(), scan_temp);
ld(temp2, itableOffsetEntry::interface_offset_in_bytes(), scan_temp);
// Check that this entry is non-null. A null entry means that
// the receiver class doesn't implement the interface, and wasn't the
// same as when the caller was compiled.
cmpd(CCR0, method_result, intf_klass);
cmpd(CCR0, temp2, intf_klass);
if (peel) {
beq(CCR0, found_method);
@ -1847,7 +1848,7 @@ void MacroAssembler::lookup_interface_method(Register recv_klass,
bind(search);
cmpdi(CCR0, method_result, 0);
cmpdi(CCR0, temp2, 0);
beq(CCR0, L_no_such_interface);
addi(scan_temp, scan_temp, scan_step);
}
@ -1855,9 +1856,11 @@ void MacroAssembler::lookup_interface_method(Register recv_klass,
bind(found_method);
// Got a hit.
int ito_offset = itableOffsetEntry::offset_offset_in_bytes();
lwz(scan_temp, ito_offset, scan_temp);
ldx(method_result, scan_temp, recv_klass);
if (return_method) {
int ito_offset = itableOffsetEntry::offset_offset_in_bytes();
lwz(scan_temp, ito_offset, scan_temp);
ldx(method_result, scan_temp, method_result);
}
}
// virtual method calling

View File

@ -517,7 +517,8 @@ class MacroAssembler: public Assembler {
RegisterOrConstant itable_index,
Register method_result,
Register temp_reg, Register temp2_reg,
Label& no_such_interface);
Label& no_such_interface,
bool return_method = true);
// virtual method calling
void lookup_virtual_method(Register recv_klass,

View File

@ -1185,7 +1185,7 @@ AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm
// Argument is valid and klass is as expected, continue.
// Extract method from inline cache, verified entry point needs it.
__ ld(R19_method, CompiledICHolder::holder_method_offset(), ic);
__ ld(R19_method, CompiledICHolder::holder_metadata_offset(), ic);
assert(R19_method == ic, "the inline cache register is dead here");
__ ld(code, method_(code));

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2016 SAP SE. All rights reserved.
* Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2017 SAP SE. 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
@ -3478,11 +3478,11 @@ void TemplateTable::invokestatic(int byte_no) {
void TemplateTable::invokeinterface_object_method(Register Rrecv_klass,
Register Rret,
Register Rflags,
Register Rindex,
Register Rmethod,
Register Rtemp1,
Register Rtemp2) {
assert_different_registers(Rindex, Rret, Rrecv_klass, Rflags, Rtemp1, Rtemp2);
assert_different_registers(Rmethod, Rret, Rrecv_klass, Rflags, Rtemp1, Rtemp2);
Label LnotFinal;
// Check for vfinal.
@ -3494,14 +3494,14 @@ void TemplateTable::invokeinterface_object_method(Register Rrecv_klass,
// Final call case.
__ profile_final_call(Rtemp1, Rscratch);
// Argument and return type profiling.
__ profile_arguments_type(Rindex, Rscratch, Rrecv_klass /* scratch */, true);
__ profile_arguments_type(Rmethod, Rscratch, Rrecv_klass /* scratch */, true);
// Do the final call - the index (f2) contains the method.
__ call_from_interpreter(Rindex, Rret, Rscratch, Rrecv_klass /* scratch */);
__ call_from_interpreter(Rmethod, Rret, Rscratch, Rrecv_klass /* scratch */);
// Non-final callc case.
__ bind(LnotFinal);
__ profile_virtual_call(Rrecv_klass, Rtemp1, Rscratch, false);
generate_vtable_call(Rrecv_klass, Rindex, Rret, Rscratch);
generate_vtable_call(Rrecv_klass, Rmethod, Rret, Rscratch);
}
void TemplateTable::invokeinterface(int byte_no) {
@ -3510,58 +3510,61 @@ void TemplateTable::invokeinterface(int byte_no) {
const Register Rscratch1 = R11_scratch1,
Rscratch2 = R12_scratch2,
Rscratch3 = R9_ARG7,
Rscratch4 = R10_ARG8,
Rtable_addr = Rscratch2,
Rmethod = R6_ARG4,
Rmethod2 = R9_ARG7,
Rinterface_klass = R5_ARG3,
Rret_type = R8_ARG6,
Rret_addr = Rret_type,
Rindex = R6_ARG4,
Rreceiver = R4_ARG2,
Rrecv_klass = Rreceiver,
Rret_addr = R8_ARG6,
Rindex = R10_ARG8,
Rreceiver = R3_ARG1,
Rrecv_klass = R4_ARG2,
Rflags = R7_ARG5;
prepare_invoke(byte_no, Rinterface_klass, Rret_addr, Rindex, Rreceiver, Rflags, Rscratch1);
prepare_invoke(byte_no, Rinterface_klass, Rret_addr, Rmethod, Rreceiver, Rflags, Rscratch1);
// Get receiver klass.
__ null_check_throw(Rreceiver, oopDesc::klass_offset_in_bytes(), Rscratch3);
__ null_check_throw(Rreceiver, oopDesc::klass_offset_in_bytes(), Rscratch2);
__ load_klass(Rrecv_klass, Rreceiver);
// Check corner case object method.
Label LobjectMethod;
Label LobjectMethod, L_no_such_interface, Lthrow_ame;
__ testbitdi(CCR0, R0, Rflags, ConstantPoolCacheEntry::is_forced_virtual_shift);
__ btrue(CCR0, LobjectMethod);
// Fallthrough: The normal invokeinterface case.
__ lookup_interface_method(Rrecv_klass, Rinterface_klass, noreg, noreg, Rscratch1, Rscratch2,
L_no_such_interface, /*return_method=*/false);
__ profile_virtual_call(Rrecv_klass, Rscratch1, Rscratch2, false);
// Find entry point to call.
Label Lthrow_icc, Lthrow_ame;
// Result will be returned in Rindex.
__ mr(Rscratch4, Rrecv_klass);
__ mr(Rscratch3, Rindex);
__ lookup_interface_method(Rrecv_klass, Rinterface_klass, Rindex, Rindex, Rscratch1, Rscratch2, Lthrow_icc);
__ cmpdi(CCR0, Rindex, 0);
// Get declaring interface class from method
__ ld(Rinterface_klass, in_bytes(Method::const_offset()), Rmethod);
__ ld(Rinterface_klass, in_bytes(ConstMethod::constants_offset()), Rinterface_klass);
__ ld(Rinterface_klass, ConstantPool::pool_holder_offset_in_bytes(), Rinterface_klass);
// Get itable index from method
__ lwa(Rindex, in_bytes(Method::itable_index_offset()), Rmethod);
__ subfic(Rindex, Rindex, Method::itable_index_max);
__ lookup_interface_method(Rrecv_klass, Rinterface_klass, Rindex, Rmethod2, Rscratch1, Rscratch2,
L_no_such_interface);
__ cmpdi(CCR0, Rmethod2, 0);
__ beq(CCR0, Lthrow_ame);
// Found entry. Jump off!
// Argument and return type profiling.
__ profile_arguments_type(Rindex, Rscratch1, Rscratch2, true);
__ call_from_interpreter(Rindex, Rret_addr, Rscratch1, Rscratch2);
__ profile_arguments_type(Rmethod2, Rscratch1, Rscratch2, true);
//__ profile_called_method(Rindex, Rscratch1);
__ call_from_interpreter(Rmethod2, Rret_addr, Rscratch1, Rscratch2);
// Vtable entry was NULL => Throw abstract method error.
__ bind(Lthrow_ame);
__ mr(Rrecv_klass, Rscratch4);
__ mr(Rindex, Rscratch3);
call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_AbstractMethodError));
// Interface was not found => Throw incompatible class change error.
__ bind(Lthrow_icc);
__ mr(Rrecv_klass, Rscratch4);
__ bind(L_no_such_interface);
call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_IncompatibleClassChangeError));
__ should_not_reach_here();
DEBUG_ONLY( __ should_not_reach_here(); )
// Special case of invokeinterface called for virtual method of
// java.lang.Object. See ConstantPoolCacheEntry::set_method() for details:
@ -3569,7 +3572,7 @@ void TemplateTable::invokeinterface(int byte_no) {
// to handle this corner case. This code isn't produced by javac, but could
// be produced by another compliant java compiler.
__ bind(LobjectMethod);
invokeinterface_object_method(Rrecv_klass, Rret_addr, Rflags, Rindex, Rscratch1, Rscratch2);
invokeinterface_object_method(Rrecv_klass, Rret_addr, Rflags, Rmethod, Rscratch1, Rscratch2);
}
void TemplateTable::invokedynamic(int byte_no) {

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2016 SAP SE. All rights reserved.
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2017 SAP SE. 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
@ -28,6 +28,7 @@
#include "code/vtableStubs.hpp"
#include "interp_masm_ppc.hpp"
#include "memory/resourceArea.hpp"
#include "oops/compiledICHolder.hpp"
#include "oops/instanceKlass.hpp"
#include "oops/klassVtable.hpp"
#include "runtime/sharedRuntime.hpp"
@ -55,17 +56,22 @@ VtableStub* VtableStubs::create_vtable_stub(int vtable_index) {
// PPC port: use fixed size.
const int code_length = VtableStub::pd_code_size_limit(true);
VtableStub* s = new (code_length) VtableStub(true, vtable_index);
// Can be NULL if there is no free space in the code cache.
if (s == NULL) {
return NULL;
}
ResourceMark rm;
CodeBuffer cb(s->entry_point(), code_length);
MacroAssembler* masm = new MacroAssembler(&cb);
address start_pc;
#ifndef PRODUCT
if (CountCompiledCalls) {
__ load_const(R11_scratch1, SharedRuntime::nof_megamorphic_calls_addr());
__ lwz(R12_scratch2, 0, R11_scratch1);
int offs = __ load_const_optimized(R11_scratch1, SharedRuntime::nof_megamorphic_calls_addr(), R12_scratch2, true);
__ lwz(R12_scratch2, offs, R11_scratch1);
__ addi(R12_scratch2, R12_scratch2, 1);
__ stw(R12_scratch2, 0, R11_scratch1);
__ stw(R12_scratch2, offs, R11_scratch1);
}
#endif
@ -116,6 +122,7 @@ VtableStub* VtableStubs::create_vtable_stub(int vtable_index) {
__ ld(R12_scratch2, in_bytes(Method::from_compiled_offset()), R19_method);
__ mtctr(R12_scratch2);
__ bctr();
masm->flush();
guarantee(__ pc() <= s->code_end(), "overflowed buffer");
@ -125,10 +132,16 @@ VtableStub* VtableStubs::create_vtable_stub(int vtable_index) {
return s;
}
VtableStub* VtableStubs::create_itable_stub(int vtable_index) {
VtableStub* VtableStubs::create_itable_stub(int itable_index) {
// PPC port: use fixed size.
const int code_length = VtableStub::pd_code_size_limit(false);
VtableStub* s = new (code_length) VtableStub(false, vtable_index);
VtableStub* s = new (code_length) VtableStub(false, itable_index);
// Can be NULL if there is no free space in the code cache.
if (s == NULL) {
return NULL;
}
ResourceMark rm;
CodeBuffer cb(s->entry_point(), code_length);
MacroAssembler* masm = new MacroAssembler(&cb);
@ -136,10 +149,10 @@ VtableStub* VtableStubs::create_itable_stub(int vtable_index) {
#ifndef PRODUCT
if (CountCompiledCalls) {
__ load_const(R11_scratch1, SharedRuntime::nof_megamorphic_calls_addr());
__ lwz(R12_scratch2, 0, R11_scratch1);
int offs = __ load_const_optimized(R11_scratch1, SharedRuntime::nof_megamorphic_calls_addr(), R12_scratch2, true);
__ lwz(R12_scratch2, offs, R11_scratch1);
__ addi(R12_scratch2, R12_scratch2, 1);
__ stw(R12_scratch2, 0, R11_scratch1);
__ stw(R12_scratch2, offs, R11_scratch1);
}
#endif
@ -148,62 +161,28 @@ VtableStub* VtableStubs::create_itable_stub(int vtable_index) {
// Entry arguments:
// R19_method: Interface
// R3_ARG1: Receiver
//
const Register rcvr_klass = R11_scratch1;
const Register vtable_len = R12_scratch2;
const Register itable_entry_addr = R21_tmp1;
const Register itable_interface = R22_tmp2;
Label L_no_such_interface;
const Register rcvr_klass = R11_scratch1,
interface = R12_scratch2,
tmp1 = R21_tmp1,
tmp2 = R22_tmp2;
// Get receiver klass.
// We might implicit NULL fault here.
address npe_addr = __ pc(); // npe = null pointer exception
__ null_check(R3_ARG1, oopDesc::klass_offset_in_bytes(), /*implicit only*/NULL);
__ load_klass(rcvr_klass, R3_ARG1);
BLOCK_COMMENT("Load start of itable entries into itable_entry.");
__ lwz(vtable_len, in_bytes(Klass::vtable_length_offset()), rcvr_klass);
__ slwi(vtable_len, vtable_len, exact_log2(vtableEntry::size_in_bytes()));
__ add(itable_entry_addr, vtable_len, rcvr_klass);
// Receiver subtype check against REFC.
__ ld(interface, CompiledICHolder::holder_klass_offset(), R19_method);
__ lookup_interface_method(rcvr_klass, interface, noreg,
R0, tmp1, tmp2,
L_no_such_interface, /*return_method=*/ false);
// Loop over all itable entries until desired interfaceOop(Rinterface) found.
BLOCK_COMMENT("Increment itable_entry_addr in loop.");
const int vtable_base_offset = in_bytes(Klass::vtable_start_offset());
__ addi(itable_entry_addr, itable_entry_addr, vtable_base_offset + itableOffsetEntry::interface_offset_in_bytes());
const int itable_offset_search_inc = itableOffsetEntry::size() * wordSize;
Label search;
__ bind(search);
__ ld(itable_interface, 0, itable_entry_addr);
// Handle IncompatibleClassChangeError in itable stubs.
// If the entry is NULL then we've reached the end of the table
// without finding the expected interface, so throw an exception.
BLOCK_COMMENT("Handle IncompatibleClassChangeError in itable stubs.");
Label throw_icce;
__ cmpdi(CCR1, itable_interface, 0);
__ cmpd(CCR0, itable_interface, R19_method);
__ addi(itable_entry_addr, itable_entry_addr, itable_offset_search_inc);
__ beq(CCR1, throw_icce);
__ bne(CCR0, search);
// Entry found and itable_entry_addr points to it, get offset of vtable for interface.
const Register vtable_offset = R12_scratch2;
const Register itable_method = R11_scratch1;
const int vtable_offset_offset = (itableOffsetEntry::offset_offset_in_bytes() -
itableOffsetEntry::interface_offset_in_bytes()) -
itable_offset_search_inc;
__ lwz(vtable_offset, vtable_offset_offset, itable_entry_addr);
// Compute itableMethodEntry and get method and entry point for compiler.
const int method_offset = (itableMethodEntry::size() * wordSize * vtable_index) +
itableMethodEntry::method_offset_in_bytes();
__ add(itable_method, rcvr_klass, vtable_offset);
__ ld(R19_method, method_offset, itable_method);
// Get Method* and entrypoint for compiler
__ ld(interface, CompiledICHolder::holder_metadata_offset(), R19_method);
__ lookup_interface_method(rcvr_klass, interface, itable_index,
R19_method, tmp1, tmp2,
L_no_such_interface, /*return_method=*/ true);
#ifndef PRODUCT
if (DebugVtables) {
@ -219,7 +198,7 @@ VtableStub* VtableStubs::create_itable_stub(int vtable_index) {
address ame_addr = __ pc(); // ame = abstract method error
// Must do an explicit check if implicit checks are disabled.
__ null_check(R19_method, in_bytes(Method::from_compiled_offset()), &throw_icce);
__ null_check(R19_method, in_bytes(Method::from_compiled_offset()), &L_no_such_interface);
__ ld(R12_scratch2, in_bytes(Method::from_compiled_offset()), R19_method);
__ mtctr(R12_scratch2);
__ bctr();
@ -229,8 +208,8 @@ VtableStub* VtableStubs::create_itable_stub(int vtable_index) {
// We force resolving of the call site by jumping to the "handle
// wrong method" stub, and so let the interpreter runtime do all the
// dirty work.
__ bind(throw_icce);
__ load_const(R11_scratch1, SharedRuntime::get_handle_wrong_method_stub());
__ bind(L_no_such_interface);
__ load_const_optimized(R11_scratch1, SharedRuntime::get_handle_wrong_method_stub(), R12_scratch2);
__ mtctr(R11_scratch1);
__ bctr();
@ -245,14 +224,15 @@ VtableStub* VtableStubs::create_itable_stub(int vtable_index) {
int VtableStub::pd_code_size_limit(bool is_vtable_stub) {
if (DebugVtables || CountCompiledCalls || VerifyOops) {
return 1000;
} else {
int decode_klass_size = MacroAssembler::instr_size_for_decode_klass_not_null();
if (is_vtable_stub) {
return 20 + decode_klass_size + 8 + 8; // Plain + cOops + Traps + safety
} else {
return 96 + decode_klass_size + 12 + 8; // Plain + cOops + Traps + safety
}
}
int size = is_vtable_stub ? 20 + 8 : 164 + 20; // Plain + safety
if (UseCompressedClassPointers) {
size += MacroAssembler::instr_size_for_decode_klass_not_null();
}
if (!ImplicitNullChecks || !os::zero_page_read_protected()) {
size += is_vtable_stub ? 8 : 12;
}
return size;
}
int VtableStub::pd_code_alignment() {

View File

@ -291,7 +291,7 @@ void LIRGenerator::do_StoreIndexed(StoreIndexed* x) {
length.set_instruction(x->length());
length.load_item();
}
if (needs_store_check) {
if (needs_store_check || x->check_boolean()) {
value.load_item();
} else {
value.load_for_store(x->elt_type());
@ -341,11 +341,14 @@ void LIRGenerator::do_StoreIndexed(StoreIndexed* x) {
// Needs GC write barriers.
pre_barrier(LIR_OprFact::address(array_addr), LIR_OprFact::illegalOpr /* pre_val */,
true /* do_load */, false /* patch */, NULL);
__ move(value.result(), array_addr, null_check_info);
// Seems to be a precise.
}
LIR_Opr result = maybe_mask_boolean(x, array.result(), value.result(), null_check_info);
__ move(result, array_addr, null_check_info);
if (obj_store) {
// Precise card mark
post_barrier(LIR_OprFact::address(array_addr), value.result());
} else {
__ move(value.result(), array_addr, null_check_info);
}
}

View File

@ -842,6 +842,38 @@ void InterpreterMacroAssembler::unlock_if_synchronized_method(TosState state,
verify_oop(Z_tos, state);
}
void InterpreterMacroAssembler::narrow(Register result, Register ret_type) {
get_method(ret_type);
z_lg(ret_type, Address(ret_type, in_bytes(Method::const_offset())));
z_lb(ret_type, Address(ret_type, in_bytes(ConstMethod::result_type_offset())));
Label notBool, notByte, notChar, done;
// common case first
compareU32_and_branch(ret_type, T_INT, bcondEqual, done);
compareU32_and_branch(ret_type, T_BOOLEAN, bcondNotEqual, notBool);
z_nilf(result, 0x1);
z_bru(done);
bind(notBool);
compareU32_and_branch(ret_type, T_BYTE, bcondNotEqual, notByte);
z_lbr(result, result);
z_bru(done);
bind(notByte);
compareU32_and_branch(ret_type, T_CHAR, bcondNotEqual, notChar);
z_nilf(result, 0xffff);
z_bru(done);
bind(notChar);
// compareU32_and_branch(ret_type, T_SHORT, bcondNotEqual, notShort);
z_lhr(result, result);
// Nothing to do for T_INT
bind(done);
}
// remove activation
//
// Unlock the receiver if this is a synchronized method.

View File

@ -86,6 +86,8 @@ class InterpreterMacroAssembler: public MacroAssembler {
void dispatch_next_noverify_oop(TosState state, int step = 0);
void dispatch_via(TosState state, address* table);
void narrow(Register result, Register ret_type);
// Jump to an invoked target.
void prepare_to_jump_from_interpreted(Register method);
void jump_from_interpreted(Register method, Register temp);

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016 SAP SE. All rights reserved.
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2017 SAP SE. 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
@ -2731,8 +2731,8 @@ void MacroAssembler::lookup_interface_method(Register recv_klass,
RegisterOrConstant itable_index,
Register method_result,
Register temp1_reg,
Register temp2_reg,
Label& no_such_interface) {
Label& no_such_interface,
bool return_method) {
const Register vtable_len = temp1_reg; // Used to compute itable_entry_addr.
const Register itable_entry_addr = Z_R1_scratch;
@ -2741,11 +2741,11 @@ void MacroAssembler::lookup_interface_method(Register recv_klass,
BLOCK_COMMENT("lookup_interface_method {");
// Load start of itable entries into itable_entry_addr.
z_llgf(vtable_len, Address(recv_klass, InstanceKlass::vtable_length_offset()));
z_llgf(vtable_len, Address(recv_klass, Klass::vtable_length_offset()));
z_sllg(vtable_len, vtable_len, exact_log2(vtableEntry::size_in_bytes()));
// Loop over all itable entries until desired interfaceOop(Rinterface) found.
const int vtable_base_offset = in_bytes(InstanceKlass::vtable_start_offset());
const int vtable_base_offset = in_bytes(Klass::vtable_start_offset());
add2reg_with_index(itable_entry_addr,
vtable_base_offset + itableOffsetEntry::interface_offset_in_bytes(),
@ -2767,38 +2767,36 @@ void MacroAssembler::lookup_interface_method(Register recv_klass,
z_brne(search);
// Entry found and itable_entry_addr points to it, get offset of vtable for interface.
if (return_method) {
const int vtable_offset_offset = (itableOffsetEntry::offset_offset_in_bytes() -
itableOffsetEntry::interface_offset_in_bytes()) -
itable_offset_search_inc;
const int vtable_offset_offset = (itableOffsetEntry::offset_offset_in_bytes() -
itableOffsetEntry::interface_offset_in_bytes()) -
itable_offset_search_inc;
// Compute itableMethodEntry and get method and entry point
// we use addressing with index and displacement, since the formula
// for computing the entry's offset has a fixed and a dynamic part,
// the latter depending on the matched interface entry and on the case,
// that the itable index has been passed as a register, not a constant value.
int method_offset = itableMethodEntry::method_offset_in_bytes();
// Fixed part (displacement), common operand.
Register itable_offset = method_result; // Dynamic part (index register).
// Compute itableMethodEntry and get method and entry point
// we use addressing with index and displacement, since the formula
// for computing the entry's offset has a fixed and a dynamic part,
// the latter depending on the matched interface entry and on the case,
// that the itable index has been passed as a register, not a constant value.
int method_offset = itableMethodEntry::method_offset_in_bytes();
// Fixed part (displacement), common operand.
Register itable_offset; // Dynamic part (index register).
if (itable_index.is_register()) {
// Compute the method's offset in that register, for the formula, see the
// else-clause below.
z_sllg(itable_offset, itable_index.as_register(), exact_log2(itableMethodEntry::size() * wordSize));
z_agf(itable_offset, vtable_offset_offset, itable_entry_addr);
} else {
// Displacement increases.
method_offset += itableMethodEntry::size() * wordSize * itable_index.as_constant();
if (itable_index.is_register()) {
// Compute the method's offset in that register, for the formula, see the
// else-clause below.
itable_offset = itable_index.as_register();
// Load index from itable.
z_llgf(itable_offset, vtable_offset_offset, itable_entry_addr);
}
z_sllg(itable_offset, itable_offset, exact_log2(itableMethodEntry::size() * wordSize));
z_agf(itable_offset, vtable_offset_offset, itable_entry_addr);
} else {
itable_offset = Z_R1_scratch;
// Displacement increases.
method_offset += itableMethodEntry::size() * wordSize * itable_index.as_constant();
// Load index from itable.
z_llgf(itable_offset, vtable_offset_offset, itable_entry_addr);
// Finally load the method's oop.
z_lg(method_result, method_offset, itable_offset, recv_klass);
}
// Finally load the method's oop.
z_lg(method_result, method_offset, itable_offset, recv_klass);
BLOCK_COMMENT("} lookup_interface_method");
}

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016 SAP SE. All rights reserved.
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2017 SAP SE. 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
@ -650,8 +650,8 @@ class MacroAssembler: public Assembler {
RegisterOrConstant itable_index,
Register method_result,
Register temp1_reg,
Register temp2_reg,
Label& no_such_interface);
Label& no_such_interface,
bool return_method = true);
// virtual method calling
void lookup_virtual_method(Register recv_klass,

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016 SAP SE. All rights reserved.
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2017 SAP SE. 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
@ -491,7 +491,7 @@ void MethodHandles::generate_method_handle_dispatch(MacroAssembler* _masm,
Label L_no_such_interface;
__ lookup_interface_method(temp1_recv_klass, temp3_intf,
// Note: next two args must be the same:
Z_index, Z_method, temp2, noreg,
Z_index, Z_method, temp2,
L_no_such_interface);
jump_from_method_handle(_masm, Z_method, temp2, Z_R0, for_compiler_entry);

View File

@ -2628,9 +2628,9 @@ AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm
Label skip_fixup;
{
Label ic_miss;
const int klass_offset = oopDesc::klass_offset_in_bytes();
const int holder_klass_offset = CompiledICHolder::holder_klass_offset();
const int holder_method_offset = CompiledICHolder::holder_method_offset();
const int klass_offset = oopDesc::klass_offset_in_bytes();
const int holder_klass_offset = CompiledICHolder::holder_klass_offset();
const int holder_metadata_offset = CompiledICHolder::holder_metadata_offset();
// Out-of-line call to ic_miss handler.
__ call_ic_miss_handler(ic_miss, 0x11, 0, Z_R1_scratch);
@ -2659,7 +2659,7 @@ AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm
// This def MUST MATCH code in gen_c2i_adapter!
const Register code = Z_R11;
__ z_lg(Z_method, holder_method_offset, Z_method);
__ z_lg(Z_method, holder_metadata_offset, Z_method);
__ load_and_test_long(Z_R0, method_(code));
__ z_brne(ic_miss); // Cache miss: call runtime to handle this.

View File

@ -2314,6 +2314,12 @@ address TemplateInterpreterGenerator::generate_earlyret_entry_for (TosState stat
__ store_const(Address(RjvmtiState, JvmtiThreadState::earlyret_state_offset()),
JvmtiThreadState::earlyret_inactive, 4, 4, Z_R0_scratch);
if (state == itos) {
// Narrow result if state is itos but result type is smaller.
// Need to narrow in the return bytecode rather than in generate_return_entry
// since compiled code callers expect the result to already be narrowed.
__ narrow(Z_tos, Z_tmp_1); /* fall through */
}
__ remove_activation(state,
Z_tmp_1, // retaddr
false, // throw_monitor_exception

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016 SAP SE. All rights reserved.
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2017 SAP SE. 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
@ -1174,8 +1174,20 @@ void TemplateTable::bastore() {
__ pop_i(Z_ARG3);
__ pop_ptr(Z_tmp_2);
// Z_tos : value
// Z_ARG3 : index
// Z_ARG3 : index
// Z_tmp_2 : array
// Need to check whether array is boolean or byte
// since both types share the bastore bytecode.
__ load_klass(Z_tmp_1, Z_tmp_2);
__ z_llgf(Z_tmp_1, Address(Z_tmp_1, Klass::layout_helper_offset()));
__ z_tmll(Z_tmp_1, Klass::layout_helper_boolean_diffbit());
Label L_skip;
__ z_bfalse(L_skip);
// if it is a T_BOOLEAN array, mask the stored value to 0/1
__ z_nilf(Z_tos, 0x1);
__ bind(L_skip);
// No index shift necessary - pass 0.
index_check(Z_tmp_2, Z_ARG3, 0); // Prefer index in Z_ARG3.
__ z_stc(Z_tos,
@ -2321,6 +2333,13 @@ void TemplateTable::_return(TosState state) {
__ bind(skip_register_finalizer);
}
if (state == itos) {
// Narrow result if state is itos but result type is smaller.
// Need to narrow in the return bytecode rather than in generate_return_entry
// since compiled code callers expect the result to already be narrowed.
__ narrow(Z_tos, Z_tmp_1); /* fall through */
}
__ remove_activation(state, Z_R14);
__ z_br(Z_R14);
}
@ -3526,66 +3545,67 @@ void TemplateTable::invokeinterface(int byte_no) {
transition(vtos, vtos);
assert(byte_no == f1_byte, "use this argument");
Register interface = Z_tos;
Register index = Z_ARG3;
Register receiver = Z_tmp_1;
Register flags = Z_ARG5;
Register klass = Z_ARG2,
method = Z_ARG3,
interface = Z_ARG4,
flags = Z_ARG5,
receiver = Z_tmp_1;
BLOCK_COMMENT("invokeinterface {");
// Destroys Z_ARG1 and Z_ARG2, thus use Z_ARG4 and copy afterwards.
prepare_invoke(byte_no, Z_ARG4, index, // Get f1 klassOop, f2 itable index.
prepare_invoke(byte_no, interface, method, // Get f1 klassOop, f2 itable index.
receiver, flags);
// Z_R14 (== Z_bytecode) : return entry
__ z_lgr(interface, Z_ARG4);
// Special case of invokeinterface called for virtual method of
// java.lang.Object. See cpCacheOop.cpp for details.
// This code isn't produced by javac, but could be produced by
// another compliant java compiler.
Label notMethod;
NearLabel notMethod, no_such_interface, no_such_method;
__ testbit(flags, ConstantPoolCacheEntry::is_forced_virtual_shift);
__ z_brz(notMethod);
invokevirtual_helper(index, receiver, flags);
invokevirtual_helper(method, receiver, flags);
__ bind(notMethod);
// Get receiver klass into klass - also a null check.
Register klass = flags;
__ restore_locals();
__ load_klass(klass, receiver);
__ lookup_interface_method(klass, interface, noreg, noreg, /*temp*/Z_ARG1,
no_such_interface, /*return_method=*/false);
// Profile this call.
__ profile_virtual_call(klass, Z_ARG2/*mdp*/, Z_ARG4/*scratch*/);
__ profile_virtual_call(klass, Z_ARG1/*mdp*/, flags/*scratch*/);
NearLabel no_such_interface, no_such_method;
Register method = Z_tmp_2;
// Find entry point to call.
// TK 2010-08-24: save the index to Z_ARG4. needed in case of an error
// in throw_AbstractMethodErrorByTemplateTable
__ z_lgr(Z_ARG4, index);
// TK 2011-03-24: copy also klass because it could be changed in
// lookup_interface_method
__ z_lgr(Z_ARG2, klass);
__ lookup_interface_method(// inputs: rec. class, interface, itable index
klass, interface, index,
// outputs: method, scan temp. reg
method, Z_tmp_2, Z_R1_scratch,
no_such_interface);
// Get declaring interface class from method
__ z_lg(interface, Address(method, Method::const_offset()));
__ z_lg(interface, Address(interface, ConstMethod::constants_offset()));
__ z_lg(interface, Address(interface, ConstantPool::pool_holder_offset_in_bytes()));
// Get itable index from method
Register index = receiver,
method2 = flags;
__ z_lgf(index, Address(method, Method::itable_index_offset()));
__ z_aghi(index, -Method::itable_index_max);
__ z_lcgr(index, index);
__ lookup_interface_method(klass, interface, index, method2, Z_tmp_2,
no_such_interface);
// Check for abstract method error.
// Note: This should be done more efficiently via a throw_abstract_method_error
// interpreter entry point and a conditional jump to it in case of a null
// method.
__ compareU64_and_branch(method, (intptr_t) 0,
__ compareU64_and_branch(method2, (intptr_t) 0,
Assembler::bcondZero, no_such_method);
__ profile_arguments_type(Z_ARG3, method, Z_ARG5, true);
__ profile_arguments_type(Z_tmp_1, method2, Z_tmp_2, true);
// Do the call.
__ jump_from_interpreted(method, Z_ARG5);
__ jump_from_interpreted(method2, Z_tmp_2);
__ should_not_reach_here();
// exception handling code follows...
@ -3597,12 +3617,8 @@ void TemplateTable::invokeinterface(int byte_no) {
// Throw exception.
__ restore_bcp(); // Bcp must be correct for exception handler (was destroyed).
__ restore_locals(); // Make sure locals pointer is correct as well (was destroyed).
// TK 2010-08-24: Call throw_AbstractMethodErrorByTemplateTable now with the
// relevant information for generating a better error message
__ call_VM(noreg,
CAST_FROM_FN_PTR(address,
InterpreterRuntime::throw_AbstractMethodError),
Z_ARG2, interface, Z_ARG4);
CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_AbstractMethodError));
// The call_VM checks for exception, so we should never return here.
__ should_not_reach_here();
@ -3611,12 +3627,8 @@ void TemplateTable::invokeinterface(int byte_no) {
// Throw exception.
__ restore_bcp(); // Bcp must be correct for exception handler (was destroyed).
__ restore_locals(); // Make sure locals pointer is correct as well (was destroyed).
// TK 2010-08-24: Call throw_IncompatibleClassChangeErrorByTemplateTable now with the
// relevant information for generating a better error message
__ call_VM(noreg,
CAST_FROM_FN_PTR(address,
InterpreterRuntime::throw_IncompatibleClassChangeError),
Z_ARG2, interface);
CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_IncompatibleClassChangeError));
// The call_VM checks for exception, so we should never return here.
__ should_not_reach_here();

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016 SAP SE. All rights reserved.
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2017 SAP SE. 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
@ -28,6 +28,7 @@
#include "code/vtableStubs.hpp"
#include "interp_masm_s390.hpp"
#include "memory/resourceArea.hpp"
#include "oops/compiledICHolder.hpp"
#include "oops/instanceKlass.hpp"
#include "oops/klassVtable.hpp"
#include "runtime/sharedRuntime.hpp"
@ -57,7 +58,6 @@ VtableStub* VtableStubs::create_vtable_stub(int vtable_index) {
ResourceMark rm;
CodeBuffer cb(s->entry_point(), code_length);
MacroAssembler *masm = new MacroAssembler(&cb);
address start_pc;
int padding_bytes = 0;
#if (!defined(PRODUCT) && defined(COMPILER2))
@ -144,9 +144,9 @@ VtableStub* VtableStubs::create_vtable_stub(int vtable_index) {
return s;
}
VtableStub* VtableStubs::create_itable_stub(int vtable_index) {
VtableStub* VtableStubs::create_itable_stub(int itable_index) {
const int code_length = VtableStub::pd_code_size_limit(false);
VtableStub *s = new(code_length) VtableStub(false, vtable_index);
VtableStub *s = new(code_length) VtableStub(false, itable_index);
if (s == NULL) { // Indicates OOM in the code cache.
return NULL;
}
@ -154,7 +154,6 @@ VtableStub* VtableStubs::create_itable_stub(int vtable_index) {
ResourceMark rm;
CodeBuffer cb(s->entry_point(), code_length);
MacroAssembler *masm = new MacroAssembler(&cb);
address start_pc;
int padding_bytes = 0;
#if (!defined(PRODUCT) && defined(COMPILER2))
@ -174,11 +173,9 @@ VtableStub* VtableStubs::create_itable_stub(int vtable_index) {
// Entry arguments:
// Z_method: Interface
// Z_ARG1: Receiver
const Register rcvr_klass = Z_tmp_1; // Used to compute itable_entry_addr.
// Use extra reg to avoid re-load.
const Register vtable_len = Z_tmp_2; // Used to compute itable_entry_addr.
const Register itable_entry_addr = Z_R1_scratch;
const Register itable_interface = Z_R0_scratch;
NearLabel no_such_interface;
const Register rcvr_klass = Z_tmp_1,
interface = Z_tmp_2;
// Get receiver klass.
// Must do an explicit check if implicit checks are disabled.
@ -186,50 +183,15 @@ VtableStub* VtableStubs::create_itable_stub(int vtable_index) {
__ null_check(Z_ARG1, Z_R1_scratch, oopDesc::klass_offset_in_bytes());
__ load_klass(rcvr_klass, Z_ARG1);
// Load start of itable entries into itable_entry.
__ z_llgf(vtable_len, Address(rcvr_klass, InstanceKlass::vtable_length_offset()));
__ z_sllg(vtable_len, vtable_len, exact_log2(vtableEntry::size_in_bytes()));
// Receiver subtype check against REFC.
__ z_lg(interface, Address(Z_method, CompiledICHolder::holder_klass_offset()));
__ lookup_interface_method(rcvr_klass, interface, noreg,
noreg, Z_R1, no_such_interface, /*return_method=*/ false);
// Loop over all itable entries until desired interfaceOop(Rinterface) found.
const int vtable_base_offset = in_bytes(InstanceKlass::vtable_start_offset());
// Count unused bytes.
start_pc = __ pc();
__ add2reg_with_index(itable_entry_addr, vtable_base_offset + itableOffsetEntry::interface_offset_in_bytes(), rcvr_klass, vtable_len);
padding_bytes += 20 - (__ pc() - start_pc);
const int itable_offset_search_inc = itableOffsetEntry::size() * wordSize;
Label search;
__ bind(search);
// Handle IncompatibleClassChangeError in itable stubs.
// If the entry is NULL then we've reached the end of the table
// without finding the expected interface, so throw an exception.
NearLabel throw_icce;
__ load_and_test_long(itable_interface, Address(itable_entry_addr));
__ z_bre(throw_icce); // Throw the exception out-of-line.
// Count unused bytes.
start_pc = __ pc();
__ add2reg(itable_entry_addr, itable_offset_search_inc);
padding_bytes += 20 - (__ pc() - start_pc);
__ z_cgr(itable_interface, Z_method);
__ z_brne(search);
// Entry found. Itable_entry_addr points to the subsequent entry (itable_offset_search_inc too far).
// Get offset of vtable for interface.
const Register vtable_offset = Z_R1_scratch;
const Register itable_method = rcvr_klass; // Calculated before.
const int vtable_offset_offset = (itableOffsetEntry::offset_offset_in_bytes() -
itableOffsetEntry::interface_offset_in_bytes()) -
itable_offset_search_inc;
__ z_llgf(vtable_offset, vtable_offset_offset, itable_entry_addr);
// Compute itableMethodEntry and get method and entry point for compiler.
const int method_offset = (itableMethodEntry::size() * wordSize * vtable_index) +
itableMethodEntry::method_offset_in_bytes();
__ z_lg(Z_method, method_offset, vtable_offset, itable_method);
// Get Method* and entrypoint for compiler
__ z_lg(interface, Address(Z_method, CompiledICHolder::holder_metadata_offset()));
__ lookup_interface_method(rcvr_klass, interface, itable_index,
Z_method, Z_R1, no_such_interface, /*return_method=*/ true);
#ifndef PRODUCT
if (DebugVtables) {
@ -244,13 +206,13 @@ VtableStub* VtableStubs::create_itable_stub(int vtable_index) {
address ame_addr = __ pc();
// Must do an explicit check if implicit checks are disabled.
if (!ImplicitNullChecks) {
__ compare64_and_branch(Z_method, (intptr_t) 0, Assembler::bcondEqual, throw_icce);
__ compare64_and_branch(Z_method, (intptr_t) 0, Assembler::bcondEqual, no_such_interface);
}
__ z_lg(Z_R1_scratch, in_bytes(Method::from_compiled_offset()), Z_method);
__ z_br(Z_R1_scratch);
// Handle IncompatibleClassChangeError in itable stubs.
__ bind(throw_icce);
__ bind(no_such_interface);
// Count unused bytes
// worst case actual size
// We force resolving of the call site by jumping to
@ -273,13 +235,12 @@ int VtableStub::pd_code_size_limit(bool is_vtable_stub) {
if (CountCompiledCalls) {
size += 6 * 4;
}
if (is_vtable_stub) {
size += 52;
} else {
size += 104;
size += is_vtable_stub ? 36 : 140;
if (UseCompressedClassPointers) {
size += MacroAssembler::instr_size_for_decode_klass_not_null();
}
if (Universe::narrow_klass_base() != NULL) {
size += 16; // A guess.
if (!ImplicitNullChecks) {
size += 36;
}
return size;
}

View File

@ -2069,9 +2069,10 @@ void MacroAssembler::lookup_interface_method(Register recv_klass,
Register method_result,
Register scan_temp,
Register sethi_temp,
Label& L_no_such_interface) {
Label& L_no_such_interface,
bool return_method) {
assert_different_registers(recv_klass, intf_klass, method_result, scan_temp);
assert(itable_index.is_constant() || itable_index.as_register() == method_result,
assert(!return_method || itable_index.is_constant() || itable_index.as_register() == method_result,
"caller must use same register for non-constant itable index as for method");
Label L_no_such_interface_restore;
@ -2103,11 +2104,13 @@ void MacroAssembler::lookup_interface_method(Register recv_klass,
add(scan_temp, itb_offset, scan_temp);
add(recv_klass, scan_temp, scan_temp);
// Adjust recv_klass by scaled itable_index, so we can free itable_index.
RegisterOrConstant itable_offset = itable_index;
itable_offset = regcon_sll_ptr(itable_index, exact_log2(itableMethodEntry::size() * wordSize), itable_offset);
itable_offset = regcon_inc_ptr(itable_offset, itableMethodEntry::method_offset_in_bytes(), itable_offset);
add(recv_klass, ensure_simm13_or_reg(itable_offset, sethi_temp), recv_klass);
if (return_method) {
// Adjust recv_klass by scaled itable_index, so we can free itable_index.
RegisterOrConstant itable_offset = itable_index;
itable_offset = regcon_sll_ptr(itable_index, exact_log2(itableMethodEntry::size() * wordSize), itable_offset);
itable_offset = regcon_inc_ptr(itable_offset, itableMethodEntry::method_offset_in_bytes(), itable_offset);
add(recv_klass, ensure_simm13_or_reg(itable_offset, sethi_temp), recv_klass);
}
// for (scan = klass->itable(); scan->interface() != NULL; scan += scan_step) {
// if (scan->interface() == intf) {
@ -2142,12 +2145,14 @@ void MacroAssembler::lookup_interface_method(Register recv_klass,
bind(L_found_method);
// Got a hit.
int ito_offset = itableOffsetEntry::offset_offset_in_bytes();
// scan_temp[-scan_step] points to the vtable offset we need
ito_offset -= scan_step;
lduw(scan_temp, ito_offset, scan_temp);
ld_ptr(recv_klass, scan_temp, method_result);
if (return_method) {
// Got a hit.
int ito_offset = itableOffsetEntry::offset_offset_in_bytes();
// scan_temp[-scan_step] points to the vtable offset we need
ito_offset -= scan_step;
lduw(scan_temp, ito_offset, scan_temp);
ld_ptr(recv_klass, scan_temp, method_result);
}
if (did_save) {
Label L_done;

View File

@ -1290,7 +1290,8 @@ public:
RegisterOrConstant itable_index,
Register method_result,
Register temp_reg, Register temp2_reg,
Label& no_such_interface);
Label& no_such_interface,
bool return_method = true);
// virtual method calling
void lookup_virtual_method(Register recv_klass,

View File

@ -1079,7 +1079,7 @@ AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm
Label ok, ok2;
__ brx(Assembler::equal, false, Assembler::pt, ok);
__ delayed()->ld_ptr(G5_method, CompiledICHolder::holder_method_offset(), G5_method);
__ delayed()->ld_ptr(G5_method, CompiledICHolder::holder_metadata_offset(), G5_method);
__ jump_to(ic_miss, G3_scratch);
__ delayed()->nop();

View File

@ -3173,15 +3173,15 @@ void TemplateTable::invokeinterface(int byte_no) {
assert(byte_no == f1_byte, "use this argument");
const Register Rinterface = G1_scratch;
const Register Rmethod = Lscratch;
const Register Rret = G3_scratch;
const Register Rindex = Lscratch;
const Register O0_recv = O0;
const Register O1_flags = O1;
const Register O2_Klass = O2;
const Register Rscratch = G4_scratch;
assert_different_registers(Rscratch, G5_method);
prepare_invoke(byte_no, Rinterface, Rret, Rindex, O0_recv, O1_flags);
prepare_invoke(byte_no, Rinterface, Rret, Rmethod, O0_recv, O1_flags);
// get receiver klass
__ null_check(O0_recv, oopDesc::klass_offset_in_bytes());
@ -3201,55 +3201,40 @@ void TemplateTable::invokeinterface(int byte_no) {
__ bind(notMethod);
Register Rtemp = O1_flags;
Label L_no_such_interface;
// Receiver subtype check against REFC.
__ lookup_interface_method(// inputs: rec. class, interface, itable index
O2_Klass, Rinterface, noreg,
// outputs: temp reg1, temp reg2, temp reg3
G5_method, Rscratch, Rtemp,
L_no_such_interface,
/*return_method=*/false);
__ profile_virtual_call(O2_Klass, O4);
//
// find entry point to call
//
// compute start of first itableOffsetEntry (which is at end of vtable)
const int base = in_bytes(Klass::vtable_start_offset());
Label search;
Register Rtemp = O1_flags;
// Get declaring interface class from method
__ ld_ptr(Rmethod, Method::const_offset(), Rinterface);
__ ld_ptr(Rinterface, ConstMethod::constants_offset(), Rinterface);
__ ld_ptr(Rinterface, ConstantPool::pool_holder_offset_in_bytes(), Rinterface);
__ ld(O2_Klass, in_bytes(Klass::vtable_length_offset()), Rtemp);
__ sll(Rtemp, LogBytesPerWord, Rtemp); // Rscratch *= 4;
if (Assembler::is_simm13(base)) {
__ add(Rtemp, base, Rtemp);
} else {
__ set(base, Rscratch);
__ add(Rscratch, Rtemp, Rtemp);
}
__ add(O2_Klass, Rtemp, Rscratch);
// Get itable index from method
const Register Rindex = G5_method;
__ ld(Rmethod, Method::itable_index_offset(), Rindex);
__ sub(Rindex, Method::itable_index_max, Rindex);
__ neg(Rindex);
__ bind(search);
__ ld_ptr(Rscratch, itableOffsetEntry::interface_offset_in_bytes(), Rtemp);
{
Label ok;
// Check that entry is non-null. Null entries are probably a bytecode
// problem. If the interface isn't implemented by the receiver class,
// the VM should throw IncompatibleClassChangeError. linkResolver checks
// this too but that's only if the entry isn't already resolved, so we
// need to check again.
__ br_notnull_short( Rtemp, Assembler::pt, ok);
call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_IncompatibleClassChangeError));
__ should_not_reach_here();
__ bind(ok);
}
__ cmp(Rinterface, Rtemp);
__ brx(Assembler::notEqual, true, Assembler::pn, search);
__ delayed()->add(Rscratch, itableOffsetEntry::size() * wordSize, Rscratch);
// entry found and Rscratch points to it
__ ld(Rscratch, itableOffsetEntry::offset_offset_in_bytes(), Rscratch);
assert(itableMethodEntry::method_offset_in_bytes() == 0, "adjust instruction below");
__ sll(Rindex, exact_log2(itableMethodEntry::size() * wordSize), Rindex); // Rindex *= 8;
__ add(Rscratch, Rindex, Rscratch);
__ ld_ptr(O2_Klass, Rscratch, G5_method);
__ lookup_interface_method(// inputs: rec. class, interface, itable index
O2_Klass, Rinterface, Rindex,
// outputs: method, scan temp reg, temp reg
G5_method, Rscratch, Rtemp,
L_no_such_interface);
// Check for abstract method error.
{
@ -3266,6 +3251,10 @@ void TemplateTable::invokeinterface(int byte_no) {
__ profile_arguments_type(G5_method, Rcall, Gargs, true);
__ profile_called_method(G5_method, Rscratch);
__ call_from_interpreter(Rcall, Gargs, Rret);
__ bind(L_no_such_interface);
call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_IncompatibleClassChangeError));
__ should_not_reach_here();
}
void TemplateTable::invokehandle(int byte_no) {

View File

@ -27,6 +27,7 @@
#include "code/vtableStubs.hpp"
#include "interp_masm_sparc.hpp"
#include "memory/resourceArea.hpp"
#include "oops/compiledICHolder.hpp"
#include "oops/instanceKlass.hpp"
#include "oops/klassVtable.hpp"
#include "runtime/sharedRuntime.hpp"
@ -140,7 +141,8 @@ VtableStub* VtableStubs::create_itable_stub(int itable_index) {
MacroAssembler* masm = new MacroAssembler(&cb);
Register G3_Klass = G3_scratch;
Register G5_interface = G5; // Passed in as an argument
Register G5_icholder = G5; // Passed in as an argument
Register G4_interface = G4_scratch;
Label search;
// Entry arguments:
@ -164,14 +166,26 @@ VtableStub* VtableStubs::create_itable_stub(int itable_index) {
}
#endif /* PRODUCT */
Label throw_icce;
Label L_no_such_interface;
Register L5_method = L5;
// Receiver subtype check against REFC.
__ ld_ptr(G5_icholder, CompiledICHolder::holder_klass_offset(), G4_interface);
__ lookup_interface_method(// inputs: rec. class, interface, itable index
G3_Klass, G5_interface, itable_index,
G3_Klass, G4_interface, itable_index,
// outputs: scan temp. reg1, scan temp. reg2
L5_method, L2, L3,
L_no_such_interface,
/*return_method=*/ false);
// Get Method* and entrypoint for compiler
__ ld_ptr(G5_icholder, CompiledICHolder::holder_metadata_offset(), G4_interface);
__ lookup_interface_method(// inputs: rec. class, interface, itable index
G3_Klass, G4_interface, itable_index,
// outputs: method, scan temp. reg
L5_method, L2, L3,
throw_icce);
L_no_such_interface);
#ifndef PRODUCT
if (DebugVtables) {
@ -197,7 +211,7 @@ VtableStub* VtableStubs::create_itable_stub(int itable_index) {
__ JMP(G3_scratch, 0);
__ delayed()->nop();
__ bind(throw_icce);
__ bind(L_no_such_interface);
AddressLiteral icce(StubRoutines::throw_IncompatibleClassChangeError_entry());
__ jump_to(icce, G3_scratch);
__ delayed()->restore();
@ -232,7 +246,7 @@ int VtableStub::pd_code_size_limit(bool is_vtable_stub) {
MacroAssembler::instr_size_for_decode_klass_not_null() : 0);
return basic + slop;
} else {
const int basic = (28 LP64_ONLY(+ 6)) * BytesPerInstWord +
const int basic = (48 LP64_ONLY(+ 6)) * BytesPerInstWord +
// shift;add for load_klass (only shift with zero heap based)
(UseCompressedClassPointers ?
MacroAssembler::instr_size_for_decode_klass_not_null() : 0);

View File

@ -5733,8 +5733,13 @@ void MacroAssembler::lookup_interface_method(Register recv_klass,
RegisterOrConstant itable_index,
Register method_result,
Register scan_temp,
Label& L_no_such_interface) {
assert_different_registers(recv_klass, intf_klass, method_result, scan_temp);
Label& L_no_such_interface,
bool return_method) {
assert_different_registers(recv_klass, intf_klass, scan_temp);
assert_different_registers(method_result, intf_klass, scan_temp);
assert(recv_klass != method_result || !return_method,
"recv_klass can be destroyed when method isn't needed");
assert(itable_index.is_constant() || itable_index.as_register() == method_result,
"caller must use same register for non-constant itable index as for method");
@ -5751,9 +5756,11 @@ void MacroAssembler::lookup_interface_method(Register recv_klass,
// %%% Could store the aligned, prescaled offset in the klassoop.
lea(scan_temp, Address(recv_klass, scan_temp, times_vte_scale, vtable_base));
// Adjust recv_klass by scaled itable_index, so we can free itable_index.
assert(itableMethodEntry::size() * wordSize == wordSize, "adjust the scaling in the code below");
lea(recv_klass, Address(recv_klass, itable_index, Address::times_ptr, itentry_off));
if (return_method) {
// Adjust recv_klass by scaled itable_index, so we can free itable_index.
assert(itableMethodEntry::size() * wordSize == wordSize, "adjust the scaling in the code below");
lea(recv_klass, Address(recv_klass, itable_index, Address::times_ptr, itentry_off));
}
// for (scan = klass->itable(); scan->interface() != NULL; scan += scan_step) {
// if (scan->interface() == intf) {
@ -5787,9 +5794,11 @@ void MacroAssembler::lookup_interface_method(Register recv_klass,
bind(found_method);
// Got a hit.
movl(scan_temp, Address(scan_temp, itableOffsetEntry::offset_offset_in_bytes()));
movptr(method_result, Address(recv_klass, scan_temp, Address::times_1));
if (return_method) {
// Got a hit.
movl(scan_temp, Address(scan_temp, itableOffsetEntry::offset_offset_in_bytes()));
movptr(method_result, Address(recv_klass, scan_temp, Address::times_1));
}
}

View File

@ -538,7 +538,8 @@ class MacroAssembler: public Assembler {
RegisterOrConstant itable_index,
Register method_result,
Register scan_temp,
Label& no_such_interface);
Label& no_such_interface,
bool return_method = true);
// virtual method calling
void lookup_virtual_method(Register recv_klass,

View File

@ -952,7 +952,7 @@ AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm
Label missed;
__ movptr(temp, Address(receiver, oopDesc::klass_offset_in_bytes()));
__ cmpptr(temp, Address(holder, CompiledICHolder::holder_klass_offset()));
__ movptr(rbx, Address(holder, CompiledICHolder::holder_method_offset()));
__ movptr(rbx, Address(holder, CompiledICHolder::holder_metadata_offset()));
__ jcc(Assembler::notEqual, missed);
// Method might have been compiled since the call site was patched to
// interpreted if that is the case treat it as a miss so we can get

View File

@ -942,7 +942,7 @@ AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm
{
__ load_klass(temp, receiver);
__ cmpptr(temp, Address(holder, CompiledICHolder::holder_klass_offset()));
__ movptr(rbx, Address(holder, CompiledICHolder::holder_method_offset()));
__ movptr(rbx, Address(holder, CompiledICHolder::holder_metadata_offset()));
__ jcc(Assembler::equal, ok);
__ jump(RuntimeAddress(SharedRuntime::get_ic_miss_stub()));

View File

@ -3695,11 +3695,11 @@ void TemplateTable::fast_invokevfinal(int byte_no) {
void TemplateTable::invokeinterface(int byte_no) {
transition(vtos, vtos);
assert(byte_no == f1_byte, "use this argument");
prepare_invoke(byte_no, rax, rbx, // get f1 Klass*, f2 itable index
prepare_invoke(byte_no, rax, rbx, // get f1 Klass*, f2 Method*
rcx, rdx); // recv, flags
// rax: interface klass (from f1)
// rbx: itable index (from f2)
// rax: reference klass (from f1)
// rbx: method (from f2)
// rcx: receiver
// rdx: flags
@ -3721,10 +3721,28 @@ void TemplateTable::invokeinterface(int byte_no) {
__ null_check(rcx, oopDesc::klass_offset_in_bytes());
__ load_klass(rdx, rcx);
Label no_such_interface, no_such_method;
// Receiver subtype check against REFC.
// Superklass in rax. Subklass in rdx. Blows rcx, rdi.
__ lookup_interface_method(// inputs: rec. class, interface, itable index
rdx, rax, noreg,
// outputs: scan temp. reg, scan temp. reg
rbcp, rlocals,
no_such_interface,
/*return_method=*/false);
// profile this call
__ restore_bcp(); // rbcp was destroyed by receiver type check
__ profile_virtual_call(rdx, rbcp, rlocals);
Label no_such_interface, no_such_method;
// Get declaring interface class from method, and itable index
__ movptr(rax, Address(rbx, Method::const_offset()));
__ movptr(rax, Address(rax, ConstMethod::constants_offset()));
__ movptr(rax, Address(rax, ConstantPool::pool_holder_offset_in_bytes()));
__ movl(rbx, Address(rbx, Method::itable_index_offset()));
__ subl(rbx, Method::itable_index_max);
__ negl(rbx);
__ lookup_interface_method(// inputs: rec. class, interface, itable index
rdx, rax, rbx,

View File

@ -27,6 +27,7 @@
#include "code/vtableStubs.hpp"
#include "interp_masm_x86.hpp"
#include "memory/resourceArea.hpp"
#include "oops/compiledICHolder.hpp"
#include "oops/instanceKlass.hpp"
#include "oops/klassVtable.hpp"
#include "runtime/sharedRuntime.hpp"
@ -147,7 +148,7 @@ VtableStub* VtableStubs::create_itable_stub(int itable_index) {
MacroAssembler* masm = new MacroAssembler(&cb);
// Entry arguments:
// rax,: Interface
// rax: CompiledICHolder
// rcx: Receiver
#ifndef PRODUCT
@ -155,25 +156,42 @@ VtableStub* VtableStubs::create_itable_stub(int itable_index) {
__ incrementl(ExternalAddress((address) SharedRuntime::nof_megamorphic_calls_addr()));
}
#endif /* PRODUCT */
// get receiver (need to skip return address on top of stack)
assert(VtableStub::receiver_location() == rcx->as_VMReg(), "receiver expected in rcx");
// get receiver klass (also an implicit null-check)
address npe_addr = __ pc();
__ movptr(rsi, Address(rcx, oopDesc::klass_offset_in_bytes()));
// Most registers are in use; we'll use rax, rbx, rsi, rdi
// (If we need to make rsi, rdi callee-save, do a push/pop here.)
const Register method = rbx;
Label throw_icce;
const Register recv_klass_reg = rsi;
const Register holder_klass_reg = rax; // declaring interface klass (DECC)
const Register resolved_klass_reg = rbx; // resolved interface klass (REFC)
const Register temp_reg = rdi;
// Get Method* and entrypoint for compiler
const Register icholder_reg = rax;
__ movptr(resolved_klass_reg, Address(icholder_reg, CompiledICHolder::holder_klass_offset()));
__ movptr(holder_klass_reg, Address(icholder_reg, CompiledICHolder::holder_metadata_offset()));
Label L_no_such_interface;
// get receiver klass (also an implicit null-check)
address npe_addr = __ pc();
assert(VtableStub::receiver_location() == rcx->as_VMReg(), "receiver expected in rcx");
__ load_klass(recv_klass_reg, rcx);
// Receiver subtype check against REFC.
// Destroys recv_klass_reg value.
__ lookup_interface_method(// inputs: rec. class, interface
recv_klass_reg, resolved_klass_reg, noreg,
// outputs: scan temp. reg1, scan temp. reg2
recv_klass_reg, temp_reg,
L_no_such_interface,
/*return_method=*/false);
// Get selected method from declaring class and itable index
const Register method = rbx;
__ load_klass(recv_klass_reg, rcx); // restore recv_klass_reg
__ lookup_interface_method(// inputs: rec. class, interface, itable index
rsi, rax, itable_index,
recv_klass_reg, holder_klass_reg, itable_index,
// outputs: method, scan temp. reg
method, rdi,
throw_icce);
method, temp_reg,
L_no_such_interface);
// method (rbx): Method*
// rcx: receiver
@ -193,9 +211,10 @@ VtableStub* VtableStubs::create_itable_stub(int itable_index) {
address ame_addr = __ pc();
__ jmp(Address(method, Method::from_compiled_offset()));
__ bind(throw_icce);
__ bind(L_no_such_interface);
__ jump(RuntimeAddress(StubRoutines::throw_IncompatibleClassChangeError_entry()));
masm->flush();
__ flush();
if (PrintMiscellaneous && (WizardMode || Verbose)) {
tty->print_cr("itable #%d at " PTR_FORMAT "[%d] left over: %d",
@ -220,7 +239,7 @@ int VtableStub::pd_code_size_limit(bool is_vtable_stub) {
return (DebugVtables ? 210 : 16) + (CountCompiledCalls ? 6 : 0);
} else {
// Itable stub size
return (DebugVtables ? 256 : 66) + (CountCompiledCalls ? 6 : 0);
return (DebugVtables ? 256 : 110) + (CountCompiledCalls ? 6 : 0);
}
// In order to tune these parameters, run the JVM with VM options
// +PrintMiscellaneous and +WizardMode to see information about

View File

@ -27,6 +27,7 @@
#include "code/vtableStubs.hpp"
#include "interp_masm_x86.hpp"
#include "memory/resourceArea.hpp"
#include "oops/compiledICHolder.hpp"
#include "oops/instanceKlass.hpp"
#include "oops/klassVtable.hpp"
#include "runtime/sharedRuntime.hpp"
@ -147,36 +148,50 @@ VtableStub* VtableStubs::create_itable_stub(int itable_index) {
#endif
// Entry arguments:
// rax: Interface
// rax: CompiledICHolder
// j_rarg0: Receiver
// Free registers (non-args) are rax (interface), rbx
// get receiver (need to skip return address on top of stack)
assert(VtableStub::receiver_location() == j_rarg0->as_VMReg(), "receiver expected in j_rarg0");
// get receiver klass (also an implicit null-check)
address npe_addr = __ pc();
// Most registers are in use; we'll use rax, rbx, r10, r11
// (various calling sequences use r[cd]x, r[sd]i, r[89]; stay away from them)
__ load_klass(r10, j_rarg0);
const Register recv_klass_reg = r10;
const Register holder_klass_reg = rax; // declaring interface klass (DECC)
const Register resolved_klass_reg = rbx; // resolved interface klass (REFC)
const Register temp_reg = r11;
Label L_no_such_interface;
const Register icholder_reg = rax;
__ movptr(resolved_klass_reg, Address(icholder_reg, CompiledICHolder::holder_klass_offset()));
__ movptr(holder_klass_reg, Address(icholder_reg, CompiledICHolder::holder_metadata_offset()));
// get receiver klass (also an implicit null-check)
assert(VtableStub::receiver_location() == j_rarg0->as_VMReg(), "receiver expected in j_rarg0");
address npe_addr = __ pc();
__ load_klass(recv_klass_reg, j_rarg0);
// Receiver subtype check against REFC.
// Destroys recv_klass_reg value.
__ lookup_interface_method(// inputs: rec. class, interface
recv_klass_reg, resolved_klass_reg, noreg,
// outputs: scan temp. reg1, scan temp. reg2
recv_klass_reg, temp_reg,
L_no_such_interface,
/*return_method=*/false);
// Get selected method from declaring class and itable index
const Register method = rbx;
__ load_klass(recv_klass_reg, j_rarg0); // restore recv_klass_reg
__ lookup_interface_method(// inputs: rec. class, interface, itable index
recv_klass_reg, holder_klass_reg, itable_index,
// outputs: method, scan temp. reg
method, temp_reg,
L_no_such_interface);
// If we take a trap while this arg is on the stack we will not
// be able to walk the stack properly. This is not an issue except
// when there are mistakes in this assembly code that could generate
// a spurious fault. Ask me how I know...
const Register method = rbx;
Label throw_icce;
// Get Method* and entrypoint for compiler
__ lookup_interface_method(// inputs: rec. class, interface, itable index
r10, rax, itable_index,
// outputs: method, scan temp. reg
method, r11,
throw_icce);
// method (rbx): Method*
// j_rarg0: receiver
@ -197,7 +212,7 @@ VtableStub* VtableStubs::create_itable_stub(int itable_index) {
address ame_addr = __ pc();
__ jmp(Address(method, Method::from_compiled_offset()));
__ bind(throw_icce);
__ bind(L_no_such_interface);
__ jump(RuntimeAddress(StubRoutines::throw_IncompatibleClassChangeError_entry()));
__ flush();
@ -224,8 +239,8 @@ int VtableStub::pd_code_size_limit(bool is_vtable_stub) {
(UseCompressedClassPointers ? MacroAssembler::instr_size_for_decode_klass_not_null() : 0);
} else {
// Itable stub size
return (DebugVtables ? 512 : 74) + (CountCompiledCalls ? 13 : 0) +
(UseCompressedClassPointers ? MacroAssembler::instr_size_for_decode_klass_not_null() : 0);
return (DebugVtables ? 512 : 140) + (CountCompiledCalls ? 13 : 0) +
(UseCompressedClassPointers ? 2 * MacroAssembler::instr_size_for_decode_klass_not_null() : 0);
}
// In order to tune these parameters, run the JVM with VM options
// +PrintMiscellaneous and +WizardMode to see information about

View File

@ -183,3 +183,9 @@ address MethodHandles::generate_method_handle_interpreter_entry(MacroAssembler*
return NULL;
}
}
#ifndef PRODUCT
void MethodHandles::trace_method_handle(MacroAssembler* _masm, const char* adaptername) {
// This is just a stub.
}
#endif //PRODUCT

View File

@ -40,10 +40,10 @@ public class CompiledICHolder extends VMObject {
}
private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
Type type = db.lookupType("CompiledICHolder");
holderMethod = new MetadataField(type.getAddressField("_holder_method"), 0);
holderKlass = new MetadataField(type.getAddressField("_holder_klass"), 0);
headerSize = type.getSize();
Type type = db.lookupType("CompiledICHolder");
holderMetadata = new MetadataField(type.getAddressField("_holder_metadata"), 0);
holderKlass = new MetadataField(type.getAddressField("_holder_klass"), 0);
headerSize = type.getSize();
}
public CompiledICHolder(Address addr) {
@ -55,12 +55,12 @@ public class CompiledICHolder extends VMObject {
private static long headerSize;
// Fields
private static MetadataField holderMethod;
private static MetadataField holderMetadata;
private static MetadataField holderKlass;
// Accessors for declared fields
public Method getHolderMethod() { return (Method) holderMethod.getValue(this); }
public Klass getHolderKlass() { return (Klass) holderKlass.getValue(this); }
public Metadata getHolderMetadata() { return (Metadata) holderMetadata.getValue(this); }
public Klass getHolderKlass() { return (Klass) holderKlass.getValue(this); }
public void printValueOn(PrintStream tty) {
tty.print("CompiledICHolder");

View File

@ -273,7 +273,7 @@ void AOTCompiledMethod::metadata_do(void f(Metadata*)) {
CompiledIC *ic = CompiledIC_at(&iter);
if (ic->is_icholder_call()) {
CompiledICHolder* cichk = ic->cached_icholder();
f(cichk->holder_method());
f(cichk->holder_metadata());
f(cichk->holder_klass());
} else {
// Get Klass* or NULL (if value is -1) from GOT cell of virtual call PLT stub.

View File

@ -230,10 +230,13 @@ bool CompiledIC::set_to_megamorphic(CallInfo* call_info, Bytecodes::Code bytecod
#ifdef ASSERT
int index = call_info->resolved_method()->itable_index();
assert(index == itable_index, "CallInfo pre-computes this");
#endif //ASSERT
InstanceKlass* k = call_info->resolved_method()->method_holder();
assert(k->verify_itable_index(itable_index), "sanity check");
InlineCacheBuffer::create_transition_stub(this, k, entry);
#endif //ASSERT
CompiledICHolder* holder = new CompiledICHolder(call_info->resolved_method()->method_holder(),
call_info->resolved_klass()());
holder->claim();
InlineCacheBuffer::create_transition_stub(this, holder, entry);
} else {
assert(call_info->call_kind() == CallInfo::vtable_call, "either itable or vtable");
// Can be different than selected_method->vtable_index(), due to package-private etc.
@ -517,7 +520,14 @@ void CompiledIC::compute_monomorphic_entry(const methodHandle& method,
bool CompiledIC::is_icholder_entry(address entry) {
CodeBlob* cb = CodeCache::find_blob_unsafe(entry);
return (cb != NULL && cb->is_adapter_blob());
if (cb != NULL && cb->is_adapter_blob()) {
return true;
}
// itable stubs also use CompiledICHolder
if (VtableStubs::is_entry_point(entry) && VtableStubs::stub_containing(entry)->is_itable_stub()) {
return true;
}
return false;
}
bool CompiledIC::is_icholder_call_site(virtual_call_Relocation* call_site, const CompiledMethod* cm) {

View File

@ -45,11 +45,11 @@
// \ / \ /
// [4] \ / [4] \->-/
// \->- Megamorphic -<-/
// (Method*)
// (CompiledICHolder*)
//
// The text in paranteses () refere to the value of the inline cache receiver (mov instruction)
// The text in parentheses () refers to the value of the inline cache receiver (mov instruction)
//
// The numbers in square brackets refere to the kind of transition:
// The numbers in square brackets refer to the kind of transition:
// [1]: Initial fixup. Receiver it found from debug information
// [2]: Compilation of a method
// [3]: Recompilation of a method (note: only entry is changed. The Klass* must stay the same)

View File

@ -417,8 +417,7 @@ void CompiledMethod::clean_ic_if_metadata_is_dead(CompiledIC *ic, BoolObjectClos
// yet be marked below. (We check this further below).
CompiledICHolder* cichk_oop = ic->cached_icholder();
if (cichk_oop->holder_method()->method_holder()->is_loader_alive(is_alive) &&
cichk_oop->holder_klass()->is_loader_alive(is_alive)) {
if (cichk_oop->is_loader_alive(is_alive)) {
return;
}
} else {

View File

@ -1577,7 +1577,7 @@ void nmethod::metadata_do(void f(Metadata*)) {
CompiledIC *ic = CompiledIC_at(&iter);
if (ic->is_icholder_call()) {
CompiledICHolder* cichk = ic->cached_icholder();
f(cichk->holder_method());
f(cichk->holder_metadata());
f(cichk->holder_klass());
} else {
Metadata* ic_oop = ic->cached_metadata();

View File

@ -2538,13 +2538,35 @@ run:
// this could definitely be cleaned up QQQ
Method* callee;
Klass* iclass = cache->f1_as_klass();
// InstanceKlass* interface = (InstanceKlass*) iclass;
Method *interface_method = cache->f2_as_interface_method();
InstanceKlass* iclass = interface_method->method_holder();
// get receiver
int parms = cache->parameter_size();
oop rcvr = STACK_OBJECT(-parms);
CHECK_NULL(rcvr);
InstanceKlass* int2 = (InstanceKlass*) rcvr->klass();
// Receiver subtype check against resolved interface klass (REFC).
{
Klass* refc = cache->f1_as_klass();
itableOffsetEntry* scan;
for (scan = (itableOffsetEntry*) int2->start_of_itable();
scan->interface_klass() != NULL;
scan++) {
if (scan->interface_klass() == refc) {
break;
}
}
// Check that the entry is non-null. A null entry means
// that the receiver class doesn't implement the
// interface, and wasn't the same as when the caller was
// compiled.
if (scan->interface_klass() == NULL) {
VM_JAVA_ERROR(vmSymbols::java_lang_IncompatibleClassChangeError(), "", note_no_trap);
}
}
itableOffsetEntry* ki = (itableOffsetEntry*) int2->start_of_itable();
int i;
for ( i = 0 ; i < int2->itable_length() ; i++, ki++ ) {
@ -2556,7 +2578,8 @@ run:
if (i == int2->itable_length()) {
VM_JAVA_ERROR(vmSymbols::java_lang_IncompatibleClassChangeError(), "", note_no_trap);
}
int mindex = cache->f2_as_index();
int mindex = interface_method->itable_index();
itableMethodEntry* im = ki->first_method_entry(rcvr->klass());
callee = im[mindex].method();
if (callee == NULL) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2017, 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
@ -795,7 +795,7 @@ void InterpreterRuntime::resolve_invoke(JavaThread* thread, Bytecodes::Code byte
// it is not an interface. The receiver for invokespecial calls within interface
// methods must be checked for every call.
InstanceKlass* sender = pool->pool_holder();
sender = sender->is_anonymous() ? sender->host_klass() : sender;
sender = sender->has_host_klass() ? sender->host_klass() : sender;
switch (info.call_kind()) {
case CallInfo::direct_call:
@ -813,6 +813,7 @@ void InterpreterRuntime::resolve_invoke(JavaThread* thread, Bytecodes::Code byte
case CallInfo::itable_call:
cp_cache_entry->set_itable_call(
bytecode,
info.resolved_klass(),
info.resolved_method(),
info.itable_index());
break;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2017, 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
@ -1061,11 +1061,7 @@ void LinkResolver::resolve_special_call(CallInfo& result,
const LinkInfo& link_info,
TRAPS) {
methodHandle resolved_method = linktime_resolve_special_method(link_info, CHECK);
runtime_resolve_special_method(result, resolved_method,
link_info.resolved_klass(),
link_info.current_klass(),
recv,
link_info.check_access(), CHECK);
runtime_resolve_special_method(result, link_info, resolved_method, recv, CHECK);
}
// throws linktime exceptions
@ -1148,11 +1144,11 @@ methodHandle LinkResolver::linktime_resolve_special_method(const LinkInfo& link_
// throws runtime exceptions
void LinkResolver::runtime_resolve_special_method(CallInfo& result,
const LinkInfo& link_info,
const methodHandle& resolved_method,
KlassHandle resolved_klass,
KlassHandle current_klass,
Handle recv,
bool check_access, TRAPS) {
Handle recv, TRAPS) {
KlassHandle resolved_klass = link_info.resolved_klass();
// resolved method is selected method unless we have an old-style lookup
// for a superclass method
@ -1160,12 +1156,13 @@ void LinkResolver::runtime_resolve_special_method(CallInfo& result,
// no checks for shadowing
methodHandle sel_method(THREAD, resolved_method());
if (check_access &&
if (link_info.check_access() &&
// check if the method is not <init>
resolved_method->name() != vmSymbols::object_initializer_name()) {
// check if this is an old-style super call and do a new lookup if so
// check if this is an old-style super call and do a new lookup if so
// a) check if ACC_SUPER flag is set for the current class
KlassHandle current_klass = link_info.current_klass();
if ((current_klass->is_super() || !AllowNonVirtualCalls) &&
// b) check if the class of the resolved_klass is a superclass
// (not supertype in order to exclude interface classes) of the current class.
@ -1185,6 +1182,9 @@ void LinkResolver::runtime_resolve_special_method(CallInfo& result,
Method::name_and_sig_as_C_string(resolved_klass(),
resolved_method->name(),
resolved_method->signature()));
// check loader constraints if found a different method
} else if (sel_method() != resolved_method()) {
check_method_loader_constraints(link_info, sel_method, "method", CHECK);
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2017, 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
@ -227,11 +227,10 @@ class LinkResolver: AllStatic {
static methodHandle linktime_resolve_interface_method (const LinkInfo& link_info, TRAPS);
static void runtime_resolve_special_method (CallInfo& result,
const LinkInfo& link_info,
const methodHandle& resolved_method,
KlassHandle resolved_klass,
KlassHandle current_klass,
Handle recv,
bool check_access, TRAPS);
Handle recv, TRAPS);
static void runtime_resolve_virtual_method (CallInfo& result,
const methodHandle& resolved_method,
KlassHandle resolved_klass,

View File

@ -32,8 +32,8 @@ volatile int CompiledICHolder::_live_count;
volatile int CompiledICHolder::_live_not_claimed_count;
CompiledICHolder::CompiledICHolder(Method* method, Klass* klass)
: _holder_method(method), _holder_klass(klass) {
CompiledICHolder::CompiledICHolder(Metadata* metadata, Klass* klass)
: _holder_metadata(metadata), _holder_klass(klass) {
#ifdef ASSERT
Atomic::inc(&_live_count);
Atomic::inc(&_live_not_claimed_count);
@ -47,12 +47,28 @@ CompiledICHolder::~CompiledICHolder() {
}
#endif // ASSERT
bool CompiledICHolder::is_loader_alive(BoolObjectClosure* is_alive) {
if (_holder_metadata->is_method()) {
if (!((Method*)_holder_metadata)->method_holder()->is_loader_alive(is_alive)) {
return false;
}
} else if (_holder_metadata->is_klass()) {
if (!((Klass*)_holder_metadata)->is_loader_alive(is_alive)) {
return false;
}
}
if (!_holder_klass->is_loader_alive(is_alive)) {
return false;
}
return true;
}
// Printing
void CompiledICHolder::print_on(outputStream* st) const {
st->print("%s", internal_name());
st->print(" - method: "); holder_method()->print_value_on(st); st->cr();
st->print(" - klass: "); holder_klass()->print_value_on(st); st->cr();
st->print(" - metadata: "); holder_metadata()->print_value_on(st); st->cr();
st->print(" - klass: "); holder_klass()->print_value_on(st); st->cr();
}
void CompiledICHolder::print_value_on(outputStream* st) const {
@ -63,7 +79,7 @@ void CompiledICHolder::print_value_on(outputStream* st) const {
// Verification
void CompiledICHolder::verify_on(outputStream* st) {
guarantee(holder_method()->is_method(), "should be method");
guarantee(holder_metadata()->is_method() || holder_metadata()->is_klass(), "should be method or klass");
guarantee(holder_klass()->is_klass(), "should be klass");
}

View File

@ -29,8 +29,9 @@
#include "utilities/macros.hpp"
// A CompiledICHolder* is a helper object for the inline cache implementation.
// It holds an intermediate value (method+klass pair) used when converting from
// compiled to an interpreted call.
// It holds:
// (1) (method+klass pair) when converting from compiled to an interpreted call
// (2) (klass+klass pair) when calling itable stub from megamorphic compiled call
//
// These are always allocated in the C heap and are freed during a
// safepoint by the ICBuffer logic. It's unsafe to free them earlier
@ -45,32 +46,33 @@ class CompiledICHolder : public CHeapObj<mtCompiler> {
static volatile int _live_not_claimed_count; // allocated but not yet in use so not
// reachable by iterating over nmethods
Method* _holder_method;
Metadata* _holder_metadata;
Klass* _holder_klass; // to avoid name conflict with oopDesc::_klass
CompiledICHolder* _next;
public:
// Constructor
CompiledICHolder(Method* method, Klass* klass);
CompiledICHolder(Metadata* metadata, Klass* klass);
~CompiledICHolder() NOT_DEBUG_RETURN;
static int live_count() { return _live_count; }
static int live_not_claimed_count() { return _live_not_claimed_count; }
// accessors
Method* holder_method() const { return _holder_method; }
Klass* holder_klass() const { return _holder_klass; }
Metadata* holder_metadata() const { return _holder_metadata; }
void set_holder_method(Method* m) { _holder_method = m; }
void set_holder_klass(Klass* k) { _holder_klass = k; }
void set_holder_metadata(Metadata* m) { _holder_metadata = m; }
void set_holder_klass(Klass* k) { _holder_klass = k; }
// interpreter support (offsets in bytes)
static int holder_method_offset() { return offset_of(CompiledICHolder, _holder_method); }
static int holder_metadata_offset() { return offset_of(CompiledICHolder, _holder_metadata); }
static int holder_klass_offset() { return offset_of(CompiledICHolder, _holder_klass); }
CompiledICHolder* next() { return _next; }
void set_next(CompiledICHolder* n) { _next = n; }
bool is_loader_alive(BoolObjectClosure* is_alive);
// Verify
void verify_on(outputStream* st);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2017, 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
@ -958,7 +958,7 @@ class SymbolHashMap: public CHeapObj<mtSymbol> {
delete(cur);
}
}
delete _buckets;
FREE_C_HEAP_ARRAY(SymbolHashMapBucket, _buckets);
}
}; // End SymbolHashMap class

View File

@ -255,14 +255,16 @@ void ConstantPoolCacheEntry::set_vtable_call(Bytecodes::Code invoke_code, method
set_direct_or_vtable_call(invoke_code, method, index, false);
}
void ConstantPoolCacheEntry::set_itable_call(Bytecodes::Code invoke_code, const methodHandle& method, int index) {
void ConstantPoolCacheEntry::set_itable_call(Bytecodes::Code invoke_code,
KlassHandle referenced_klass,
const methodHandle& method, int index) {
assert(method->method_holder()->verify_itable_index(index), "");
assert(invoke_code == Bytecodes::_invokeinterface, "");
InstanceKlass* interf = method->method_holder();
assert(interf->is_interface(), "must be an interface");
assert(!method->is_final_method(), "interfaces do not have final methods; cannot link to one here");
set_f1(interf);
set_f2(index);
set_f1(referenced_klass());
set_f2((intx)method());
set_method_flags(as_TosState(method->result_type()),
0, // no option bits
method()->size_of_parameters());
@ -434,10 +436,23 @@ oop ConstantPoolCacheEntry::method_type_if_resolved(const constantPoolHandle& cp
#if INCLUDE_JVMTI
void log_adjust(const char* entry_type, Method* old_method, Method* new_method, bool* trace_name_printed) {
if (log_is_enabled(Info, redefine, class, update)) {
ResourceMark rm;
if (!(*trace_name_printed)) {
log_info(redefine, class, update)("adjust: name=%s", old_method->method_holder()->external_name());
*trace_name_printed = true;
}
log_debug(redefine, class, update, constantpool)
("cpc %s entry update: %s(%s)", entry_type, new_method->name()->as_C_string(), new_method->signature()->as_C_string());
}
}
// RedefineClasses() API support:
// If this ConstantPoolCacheEntry refers to old_method then update it
// to refer to new_method.
bool ConstantPoolCacheEntry::adjust_method_entry(Method* old_method,
void ConstantPoolCacheEntry::adjust_method_entry(Method* old_method,
Method* new_method, bool * trace_name_printed) {
if (is_vfinal()) {
@ -446,63 +461,35 @@ bool ConstantPoolCacheEntry::adjust_method_entry(Method* old_method,
// match old_method so need an update
// NOTE: can't use set_f2_as_vfinal_method as it asserts on different values
_f2 = (intptr_t)new_method;
if (log_is_enabled(Info, redefine, class, update)) {
ResourceMark rm;
if (!(*trace_name_printed)) {
log_info(redefine, class, update)("adjust: name=%s", old_method->method_holder()->external_name());
*trace_name_printed = true;
}
log_debug(redefine, class, update, constantpool)
("cpc vf-entry update: %s(%s)", new_method->name()->as_C_string(), new_method->signature()->as_C_string());
}
return true;
log_adjust("vfinal", old_method, new_method, trace_name_printed);
}
// f1() is not used with virtual entries so bail out
return false;
return;
}
if (_f1 == NULL) {
// NULL f1() means this is a virtual entry so bail out
// We are assuming that the vtable index does not need change.
return false;
}
assert (_f1 != NULL, "should not call with uninteresting entry");
if (_f1 == old_method) {
if (!(_f1->is_method())) {
// _f1 is a Klass* for an interface, _f2 is the method
if (f2_as_interface_method() == old_method) {
_f2 = (intptr_t)new_method;
log_adjust("interface", old_method, new_method, trace_name_printed);
}
} else if (_f1 == old_method) {
_f1 = new_method;
if (log_is_enabled(Info, redefine, class, update)) {
ResourceMark rm;
if (!(*trace_name_printed)) {
log_info(redefine, class, update)("adjust: name=%s", old_method->method_holder()->external_name());
*trace_name_printed = true;
}
log_debug(redefine, class, update, constantpool)
("cpc entry update: %s(%s)", new_method->name()->as_C_string(), new_method->signature()->as_C_string());
}
return true;
log_adjust("special, static or dynamic", old_method, new_method, trace_name_printed);
}
return false;
}
// a constant pool cache entry should never contain old or obsolete methods
bool ConstantPoolCacheEntry::check_no_old_or_obsolete_entries() {
if (is_vfinal()) {
// virtual and final so _f2 contains method ptr instead of vtable index
Metadata* f2 = (Metadata*)_f2;
// Return false if _f2 refers to an old or an obsolete method.
// _f2 == NULL || !_f2->is_method() are just as unexpected here.
return (f2 != NULL NOT_PRODUCT(&& f2->is_valid()) && f2->is_method() &&
!((Method*)f2)->is_old() && !((Method*)f2)->is_obsolete());
} else if (_f1 == NULL ||
(NOT_PRODUCT(_f1->is_valid() &&) !_f1->is_method())) {
// _f1 == NULL || !_f1->is_method() are OK here
Method* m = get_interesting_method_entry(NULL);
// return false if m refers to a non-deleted old or obsolete method
if (m != NULL) {
assert(m->is_valid() && m->is_method(), "m is a valid method");
return !m->is_old() && !m->is_obsolete(); // old is always set for old and obsolete
} else {
return true;
}
// return false if _f1 refers to a non-deleted old or obsolete method
return (NOT_PRODUCT(_f1->is_valid() &&) _f1->is_method() &&
(f1_as_method()->is_deleted() ||
(!f1_as_method()->is_old() && !f1_as_method()->is_obsolete())));
}
Method* ConstantPoolCacheEntry::get_interesting_method_entry(Klass* k) {
@ -519,10 +506,11 @@ Method* ConstantPoolCacheEntry::get_interesting_method_entry(Klass* k) {
return NULL;
} else {
if (!(_f1->is_method())) {
// _f1 can also contain a Klass* for an interface
return NULL;
// _f1 is a Klass* for an interface
m = f2_as_interface_method();
} else {
m = f1_as_method();
}
m = f1_as_method();
}
assert(m != NULL && m->is_method(), "sanity check");
if (m == NULL || !m->is_method() || (k != NULL && m->method_holder() != k)) {

View File

@ -249,6 +249,7 @@ class ConstantPoolCacheEntry VALUE_OBJ_CLASS_SPEC {
void set_itable_call(
Bytecodes::Code invoke_code, // the bytecode used; must be invokeinterface
KlassHandle referenced_klass, // the referenced klass in the InterfaceMethodref
const methodHandle& method, // the resolved interface method
int itable_index // index into itable for the method
);
@ -345,6 +346,7 @@ class ConstantPoolCacheEntry VALUE_OBJ_CLASS_SPEC {
bool is_f1_null() const { Metadata* f1 = f1_ord(); return f1 == NULL; } // classifies a CPC entry as unbound
int f2_as_index() const { assert(!is_vfinal(), ""); return (int) _f2; }
Method* f2_as_vfinal_method() const { assert(is_vfinal(), ""); return (Method*)_f2; }
Method* f2_as_interface_method() const { assert(bytecode_1() == Bytecodes::_invokeinterface, ""); return (Method*)_f2; }
int field_index() const { assert(is_field_entry(), ""); return (_flags & field_index_mask); }
int parameter_size() const { assert(is_method_entry(), ""); return (_flags & parameter_size_mask); }
bool is_volatile() const { return (_flags & (1 << is_volatile_shift)) != 0; }
@ -377,7 +379,7 @@ class ConstantPoolCacheEntry VALUE_OBJ_CLASS_SPEC {
// trace_name_printed is set to true if the current call has
// printed the klass name so that other routines in the adjust_*
// group don't print the klass name.
bool adjust_method_entry(Method* old_method, Method* new_method,
void adjust_method_entry(Method* old_method, Method* new_method,
bool* trace_name_printed);
bool check_no_old_or_obsolete_entries();
Method* get_interesting_method_entry(Klass* k);

View File

@ -625,9 +625,11 @@ class InstanceKlass: public Klass {
InstanceKlass* host_klass() const {
InstanceKlass** hk = adr_host_klass();
if (hk == NULL) {
assert(!is_anonymous(), "Anonymous classes have host klasses");
return NULL;
} else {
assert(*hk != NULL, "host klass should always be set if the address is not null");
assert(is_anonymous(), "Only anonymous classes have host klasses");
return *hk;
}
}
@ -639,6 +641,9 @@ class InstanceKlass: public Klass {
*addr = host;
}
}
bool has_host_klass() const {
return adr_host_klass() != NULL;
}
bool is_anonymous() const {
return (_misc_flags & _misc_is_anonymous) != 0;
}

View File

@ -1173,7 +1173,6 @@ void klassItable::initialize_itable_for_interface(int method_table_offset, Klass
Array<Method*>* methods = InstanceKlass::cast(interf_h())->methods();
int nof_methods = methods->length();
HandleMark hm;
assert(nof_methods > 0, "at least one method must exist for interface to be in vtable");
Handle interface_loader (THREAD, InstanceKlass::cast(interf_h())->class_loader());
int ime_count = method_count_for_interface(interf_h());
@ -1350,8 +1349,10 @@ void visit_all_interfaces(Array<Klass*>* transitive_intf, InterfaceVisiterClosur
}
}
// Only count interfaces with at least one method
if (method_count > 0) {
// Visit all interfaces which either have any methods or can participate in receiver type check.
// We do not bother to count methods in transitive interfaces, although that would allow us to skip
// this step in the rare case of a zero-method interface extending another zero-method interface.
if (method_count > 0 || InstanceKlass::cast(intf)->transitive_interfaces()->length() > 0) {
blk->doit(intf, method_count);
}
}

View File

@ -700,6 +700,7 @@ class Method : public Metadata {
static ByteSize from_interpreted_offset() { return byte_offset_of(Method, _from_interpreted_entry ); }
static ByteSize interpreter_entry_offset() { return byte_offset_of(Method, _i2i_entry ); }
static ByteSize signature_handler_offset() { return in_ByteSize(sizeof(Method) + wordSize); }
static ByteSize itable_index_offset() { return byte_offset_of(Method, _vtable_index ); }
// for code generation
static int method_data_offset_in_bytes() { return offset_of(Method, _method_data); }

View File

@ -2839,7 +2839,7 @@ jni_Get##Result##ArrayRegion(JNIEnv *env, ElementType##Array array, jsize start,
EntryProbe; \
DT_VOID_RETURN_MARK(Get##Result##ArrayRegion); \
typeArrayOop src = typeArrayOop(JNIHandles::resolve_non_null(array)); \
if (start < 0 || len < 0 || ((unsigned int)start + (unsigned int)len > (unsigned int)src->length())) { \
if (start < 0 || len < 0 || (start > src->length() - len)) { \
THROW(vmSymbols::java_lang_ArrayIndexOutOfBoundsException()); \
} else { \
if (len > 0) { \
@ -2889,7 +2889,7 @@ jni_Set##Result##ArrayRegion(JNIEnv *env, ElementType##Array array, jsize start,
EntryProbe; \
DT_VOID_RETURN_MARK(Set##Result##ArrayRegion); \
typeArrayOop dst = typeArrayOop(JNIHandles::resolve_non_null(array)); \
if (start < 0 || len < 0 || ((unsigned int)start + (unsigned int)len > (unsigned int)dst->length())) { \
if (start < 0 || len < 0 || (start > dst->length() - len)) { \
THROW(vmSymbols::java_lang_ArrayIndexOutOfBoundsException()); \
} else { \
if (len > 0) { \
@ -3126,7 +3126,7 @@ JNI_ENTRY(void, jni_GetStringRegion(JNIEnv *env, jstring string, jsize start, js
DT_VOID_RETURN_MARK(GetStringRegion);
oop s = JNIHandles::resolve_non_null(string);
int s_len = java_lang_String::length(s);
if (start < 0 || len < 0 || start + len > s_len) {
if (start < 0 || len < 0 || start > s_len - len) {
THROW(vmSymbols::java_lang_StringIndexOutOfBoundsException());
} else {
if (len > 0) {
@ -3152,7 +3152,7 @@ JNI_ENTRY(void, jni_GetStringUTFRegion(JNIEnv *env, jstring string, jsize start,
DT_VOID_RETURN_MARK(GetStringUTFRegion);
oop s = JNIHandles::resolve_non_null(string);
int s_len = java_lang_String::length(s);
if (start < 0 || len < 0 || start + len > s_len) {
if (start < 0 || len < 0 || start > s_len - len) {
THROW(vmSymbols::java_lang_StringIndexOutOfBoundsException());
} else {
//%note jni_7

View File

@ -230,7 +230,7 @@ typedef CompactHashtable<Symbol*, char> SymbolCompactHashTable;
nonstatic_field(ArrayKlass, _dimension, int) \
volatile_nonstatic_field(ArrayKlass, _higher_dimension, Klass*) \
volatile_nonstatic_field(ArrayKlass, _lower_dimension, Klass*) \
nonstatic_field(CompiledICHolder, _holder_method, Method*) \
nonstatic_field(CompiledICHolder, _holder_metadata, Metadata*) \
nonstatic_field(CompiledICHolder, _holder_klass, Klass*) \
nonstatic_field(ConstantPool, _tags, Array<u1>*) \
nonstatic_field(ConstantPool, _cache, ConstantPoolCache*) \

View File

@ -0,0 +1,52 @@
/*
* Copyright (c) 2017, 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.
*
*/
#include "precompiled.hpp"
#include "code/vtableStubs.hpp"
#include "runtime/interfaceSupport.hpp"
#include "unittest.hpp"
TEST_VM(code, vtableStubs) {
// Should be in VM to use locks
ThreadInVMfromNative ThreadInVMfromNative(JavaThread::current());
VtableStubs::find_vtable_stub(0); // min vtable index
for (int i = 0; i < 15; i++) {
VtableStubs::find_vtable_stub((1 << i) - 1);
VtableStubs::find_vtable_stub((1 << i));
}
VtableStubs::find_vtable_stub((1 << 15) - 1); // max vtable index
}
TEST_VM(code, itableStubs) {
// Should be in VM to use locks
ThreadInVMfromNative ThreadInVMfromNative(JavaThread::current());
VtableStubs::find_itable_stub(0); // min itable index
for (int i = 0; i < 15; i++) {
VtableStubs::find_itable_stub((1 << i) - 1);
VtableStubs::find_itable_stub((1 << i));
}
VtableStubs::find_itable_stub((1 << 15) - 1); // max itable index
}

View File

@ -0,0 +1,83 @@
/*
* Copyright (c) 2017, 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 8174962
* @summary Redefine class with interface method call
* @library /test/lib
* @modules java.base/jdk.internal.misc
* @modules java.compiler
* java.instrument
* jdk.jartool/sun.tools.jar
* @run main RedefineClassHelper
* @run main/othervm -javaagent:redefineagent.jar -Xlog:redefine+class+update*=trace RedefineInterfaceCall
*/
import static jdk.test.lib.Asserts.assertEquals;
interface I1 { default int m() { return 0; } }
interface I2 extends I1 {}
public class RedefineInterfaceCall {
public static class C implements I2 {
public int test(I2 i) {
return i.m(); // invokeinterface cpCacheEntry
}
}
static String newI1 =
"interface I1 { default int m() { return 1; } }";
static String newC =
"public class RedefineInterfaceCall$C implements I2 { " +
" public int test(I2 i) { " +
" return i.m(); " +
" } " +
"} ";
static int test(I2 i) {
return i.m(); // invokeinterface cpCacheEntry
}
public static void main(String[] args) throws Exception {
C c = new C();
assertEquals(test(c), 0);
assertEquals(c.test(c), 0);
RedefineClassHelper.redefineClass(C.class, newC);
assertEquals(c.test(c), 0);
RedefineClassHelper.redefineClass(I1.class, newI1);
assertEquals(test(c), 1);
assertEquals(c.test(c), 1);
RedefineClassHelper.redefineClass(C.class, newC);
assertEquals(c.test(c), 1);
}
}

View File

@ -62,8 +62,8 @@ public class TransformTestCommon {
String parent, String child)
throws Exception {
String parentSharedMatch = parent + " source: shared objects file";
String childSharedMatch = child + " source: shared objects file";
String parentSharedMatch = " " + parent + " source: shared objects file";
String childSharedMatch = " " + child + " source: shared objects file";
if (entry.isParentExpectedShared)
out.shouldContain(parentSharedMatch);

View File

@ -417,9 +417,35 @@ ef9954f6896bb0b95ac62bf769f68b59a7a56ccd jdk-9+170
0ff9ad7d067cd4fa14450cf208bf019175a0aaba jdk-9+172
a5506b425f1bf91530d8417b57360e5d89328c0c jdk-9+173
42f18c931bd4fae5c206ccf6d8e591e4c4e69d31 jdk-9+174
c31ac0b8a60e8f872d38ad251a25ad043adc0191 jdk-9.0.1+00
c31ac0b8a60e8f872d38ad251a25ad043adc0191 jdk-9.0.3+00
e6c4f6ef717d104dba880e2dae538690c993b46f jdk-9+175
9f27d513658d5375b0e26846857d92563f279073 jdk-9+176
80acf577b7d0b886fb555c9916552844f6cc72af jdk-9+177
443025bee731eb2225371b92c1c74b519b7baf33 jdk-9+178
06df1ce4b9b887d05ce6a13f4def3547e434dd1a jdk-9+179
4feab1acec6a9c3620a19ff379a65ab8618d0e2a jdk-9+180
bd66ea2fdde3d60a73b5272263a7b8b0ca926a33 jdk-9+181
383a0001f6a0981aa061bf62d7562240abec0b18 jdk-9.0.3+1
77eba1b12ee981b9d7e6b10b33b233669a1cb23e jdk-9.0.3+2
f13da3f2da08667ff74541440bb5d67b2dad1aa9 jdk-9.0.3+3
d9b9658b2bd59ac9ca9d17209dcc487a9cf4bff2 jdk-9.0.3+4
e884b64ff38e744760402a3315816a6d74e01719 jdk-9.0.3+5
7b182ade7b8f974be5e459b018e67d1f4440e5f8 jdk-9.0.3+6
a1b2b4e871fe277827b29ca7356a723599303843 jdk-9.0.3+7
a33a03d42ff990b1041bf0f86dc90c1964e2d214 jdk-9.0.3+8
a120deff1775a5107cac1ccdf40fb41df0612f7e jdk-9.0.3+9
aa6f847fc0f4a57efc42055921994d022d5cbff0 jdk-9.0.1+10
2bd4dd6cc82060b6d705de5f47077633ae7b7c82 jdk-9.0.1+11
fa3b1c07db0508e2bb1a6ab5e8b3a2be97544243 jdk-9.0.4+00
c66ff2442ffa563c48bd641d1f4273e00833014c jdk-9.0.4+1
c03f6dda488064a24e53e372e5ad00b1d7505f6b jdk-9.0.4+2
b46885be0c21ebb379e9f9835591dc8b12245971 jdk-9.0.4+3
0d40ce5e2249fb4643614855694dd1909112bb97 jdk-9.0.4+4
7ba3aa648bf9635a75bc124539acc08d06dea600 jdk-9.0.4+5
46524cd9b1e84d2b60b15d5ef26c7ca6260c41a4 jdk-9.0.4+6
d54fb6a3fb5546fcf56bfc3c5f93fa320e79887a jdk-9.0.4+7
b9669a87f3eafe9c538346b8997413f4d8252147 jdk-9.0.4+8
9ccab3ab6ac8e3a0158e538374232e4b76664bbc jdk-9.0.4+9
d45df2aa101573054dad00ea32252960c9e8594a jdk-9.0.4+10
0dbdf13b8a138ab454f6c6db3a2ebb42828159a9 jdk-9.0.4+11

View File

@ -1 +1,2 @@
project=jdk9
bugids=dup

View File

@ -0,0 +1,37 @@
ADDITIONAL INFORMATION ABOUT LICENSING
Certain files distributed by Oracle America, Inc. and/or its affiliates are
subject to the following clarification and special exception to the GPLv2,
based on the GNU Project exception for its Classpath libraries, known as the
GNU Classpath Exception.
Note that Oracle includes multiple, independent programs in this software
package. Some of those programs are provided under licenses deemed
incompatible with the GPLv2 by the Free Software Foundation and others.
For example, the package includes programs licensed under the Apache
License, Version 2.0 and may include FreeType. Such programs are licensed
to you under their original licenses.
Oracle facilitates your further distribution of this package by adding the
Classpath Exception to the necessary parts of its GPLv2 code, which permits
you to use that code in combination with other independent modules not
licensed under the GPLv2. However, note that this would not permit you to
commingle code under an incompatible license with Oracle's GPLv2 licensed
code by, for example, cutting and pasting such code into a file also
containing Oracle's GPLv2 licensed code and then distributing the result.
Additionally, if you were to remove the Classpath Exception from any of the
files to which it applies and distribute the result, you would likely be
required to license some or all of the other code in that distribution under
the GPLv2 as well, and since the GPLv2 is incompatible with the license terms
of some items included in the distribution by Oracle, removing the Classpath
Exception could therefore effectively compromise your ability to further
distribute the package.
Failing to distribute notices associated with some files may also create
unexpected legal consequences.
Proceed with caution and we recommend that you obtain the advice of a lawyer
skilled in open source matters before removing the Classpath Exception or
making modifications to this package which may subsequently be redistributed
and/or involve the use of third party software.

View File

@ -239,9 +239,10 @@ endif
# different license.
JDK_LICENSE ?= $(wildcard $(TOPDIR)/LICENSE)
JDK_NOTICE ?= $(wildcard $(TOPDIR)/ASSEMBLY_EXCEPTION)
JDK_ADDITIONAL_LICENSE_INFO ?= $(wildcard $(TOPDIR)/ADDITIONAL_LICENSE_INFO)
$(eval $(call SetupCopyFiles, COPY_JDK_NOTICES, \
FILES := $(JDK_LICENSE) $(JDK_NOTICE), \
FILES := $(JDK_LICENSE) $(JDK_NOTICE) $(JDK_ADDITIONAL_LICENSE_INFO), \
DEST := $(LEGAL_DST_DIR), \
FLATTEN := true, \
))

View File

@ -44,7 +44,8 @@ $(INCLUDE_DST_OS_DIR)/%.h: \
################################################################################
ifneq ($(FREETYPE_BUNDLE_LIB_PATH), )
# We need to bundle the freetype library, so it will be available at runtime as well as link time.
# We need to bundle the freetype library, so it will be available at runtime
# as well as link time.
#
# NB: Default freetype build system uses -h linker option and
# result .so contains hardcoded library name that is later
@ -61,10 +62,10 @@ ifneq ($(FREETYPE_BUNDLE_LIB_PATH), )
#
#TODO: rework this to avoid hardcoding library name in the makefile
#
ifeq ($(OPENJDK_TARGET_OS), windows)
FREETYPE_TARGET_LIB := $(LIB_DST_DIR)/$(call SHARED_LIBRARY,freetype)
else
ifneq ($(filter $(OPENJDK_TARGET_OS), linux solaris), )
FREETYPE_TARGET_LIB := $(LIB_DST_DIR)/$(call SHARED_LIBRARY,freetype).6
else
FREETYPE_TARGET_LIB := $(LIB_DST_DIR)/$(call SHARED_LIBRARY,freetype)
endif
# We can't use $(install-file) in this rule because it preserves symbolic links and

View File

@ -21,4 +21,4 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
tzdata2017b
tzdata2017c

View File

@ -49,7 +49,7 @@
#
# For data circa 1899, a common source is:
# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94.
# http://www.jstor.org/stable/1774359
# https://www.jstor.org/stable/1774359
#
# A reliable and entertaining source about time zones is
# Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997).
@ -241,7 +241,7 @@ Rule Egypt 2006 only - Sep 21 24:00 0 -
# saving time in Egypt will end in the night of 2007-09-06 to 2007-09-07.
# From Jesper Nørgaard Welen (2007-08-15): [The following agree:]
# http://www.nentjes.info/Bill/bill5.htm
# http://www.timeanddate.com/worldclock/city.html?n=53
# https://www.timeanddate.com/worldclock/city.html?n=53
# From Steffen Thorsen (2007-09-04): The official information...:
# http://www.sis.gov.eg/En/EgyptOnline/Miscellaneous/000002/0207000000000000001580.htm
Rule Egypt 2007 only - Sep Thu>=1 24:00 0 -
@ -279,8 +279,8 @@ Rule Egypt 2007 only - Sep Thu>=1 24:00 0 -
# timeanddate[2] and another site I've found[3] also support that.
#
# [1] https://bugzilla.redhat.com/show_bug.cgi?id=492263
# [2] http://www.timeanddate.com/worldclock/clockchange.html?n=53
# [3] http://wwp.greenwichmeantime.com/time-zone/africa/egypt/
# [2] https://www.timeanddate.com/worldclock/clockchange.html?n=53
# [3] https://wwp.greenwichmeantime.com/time-zone/africa/egypt/
# From Arthur David Olson (2009-04-20):
# In 2009 (and for the next several years), Ramadan ends before the fourth
@ -290,10 +290,10 @@ Rule Egypt 2007 only - Sep Thu>=1 24:00 0 -
# From Steffen Thorsen (2009-08-11):
# We have been able to confirm the August change with the Egyptian Cabinet
# Information and Decision Support Center:
# http://www.timeanddate.com/news/time/egypt-dst-ends-2009.html
# https://www.timeanddate.com/news/time/egypt-dst-ends-2009.html
#
# The Middle East News Agency
# http://www.mena.org.eg/index.aspx
# https://www.mena.org.eg/index.aspx
# also reports "Egypt starts winter time on August 21"
# today in article numbered "71, 11/08/2009 12:25 GMT."
# Only the title above is available without a subscription to their service,
@ -343,7 +343,7 @@ Rule Egypt 2007 only - Sep Thu>=1 24:00 0 -
# Thursday of April.... Clocks will still be turned back for Ramadan, but
# dates not yet announced....
# http://almogaz.com/news/weird-news/2015/04/05/1947105 ...
# http://www.timeanddate.com/news/time/egypt-starts-dst-2015.html
# https://www.timeanddate.com/news/time/egypt-starts-dst-2015.html
# From Ahmed Nazmy (2015-04-20):
# Egypt's ministers cabinet just announced ... that it will cancel DST at
@ -470,11 +470,11 @@ Zone Africa/Monrovia -0:43:08 - LMT 1882
# From Even Scharning (2012-11-10):
# Libya set their time one hour back at 02:00 on Saturday November 10.
# http://www.libyaherald.com/2012/11/04/clocks-to-go-back-an-hour-on-saturday/
# https://www.libyaherald.com/2012/11/04/clocks-to-go-back-an-hour-on-saturday/
# Here is an official source [in Arabic]: http://ls.ly/fb6Yc
#
# Steffen Thorsen forwarded a translation (2012-11-10) in
# http://mm.icann.org/pipermail/tz/2012-November/018451.html
# https://mm.icann.org/pipermail/tz/2012-November/018451.html
#
# From Tim Parenti (2012-11-11):
# Treat the 2012-11-10 change as a zone change from UTC+2 to UTC+1.
@ -485,7 +485,7 @@ Zone Africa/Monrovia -0:43:08 - LMT 1882
# From Even Scharning (2013-10-25):
# The scheduled end of DST in Libya on Friday, October 25, 2013 was
# cancelled yesterday....
# http://www.libyaherald.com/2013/10/24/correction-no-time-change-tomorrow/
# https://www.libyaherald.com/2013/10/24/correction-no-time-change-tomorrow/
#
# From Paul Eggert (2013-10-25):
# For now, assume they're reverting to the pre-2012 rules of permanent UT +02.
@ -538,7 +538,7 @@ Zone Africa/Tripoli 0:52:44 - LMT 1920
# basis....
# It seems that Mauritius observed daylight saving time from 1982-10-10 to
# 1983-03-20 as well, but that was not successful....
# http://www.timeanddate.com/news/time/mauritius-daylight-saving-time.html
# https://www.timeanddate.com/news/time/mauritius-daylight-saving-time.html
# From Alex Krivenyshev (2008-06-25):
# http://economicdevelopment.gov.mu/portal/site/Mainhomepage/menuitem.a42b24128104d9845dabddd154508a0c/?content_id=0a7cee8b5d69a110VgnVCM1000000a04a8c0RCRD
@ -606,7 +606,7 @@ Zone Africa/Tripoli 0:52:44 - LMT 1920
# http://lexpress.mu/Story/3398~Beebeejaun---Les-objectifs-d-%C3%A9conomie-d-%C3%A9nergie-de-l-heure-d-%C3%A9t%C3%A9-ont-%C3%A9t%C3%A9-atteints-
#
# Our wrap-up:
# http://www.timeanddate.com/news/time/mauritius-dst-will-not-repeat.html
# https://www.timeanddate.com/news/time/mauritius-dst-will-not-repeat.html
# From Arthur David Olson (2009-07-11):
# The "mauritius-dst-will-not-repeat" wrapup includes this:
@ -638,7 +638,7 @@ Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis
# be one hour ahead of GMT between 1 June and 27 September, according to
# Communication Minister and Government Spokesman, Khalid Naciri...."
#
# http://www.worldtimezone.net/dst_news/dst_news_morocco01.html
# http://www.worldtimezone.com/dst_news/dst_news_morocco01.html
# http://en.afrik.com/news11892.html
# From Alex Krivenyshev (2008-05-09):
@ -651,7 +651,7 @@ Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis
# From Patrice Scattolin (2008-05-09):
# According to this article:
# http://www.avmaroc.com/actualite/heure-dete-comment-a127896.html
# https://www.avmaroc.com/actualite/heure-dete-comment-a127896.html
# (and republished here: <http://www.actu.ma/heure-dete-comment_i127896_0.html>)
# the changes occur at midnight:
#
@ -673,7 +673,7 @@ Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis
# posted in English).
#
# The following Google query will generate many relevant hits:
# http://www.google.com/search?hl=en&q=Conseil+de+gouvernement+maroc+heure+avance&btnG=Search
# https://www.google.com/search?hl=en&q=Conseil+de+gouvernement+maroc+heure+avance&btnG=Search
# From Steffen Thorsen (2008-08-27):
# Morocco will change the clocks back on the midnight between August 31
@ -684,7 +684,7 @@ Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis
# http://www.menara.ma/fr/Actualites/Maroc/Societe/ci.retour_a_l_heure_gmt_a_partir_du_dimanche_31_aout_a_minuit_officiel_.default
#
# We have some further details posted here:
# http://www.timeanddate.com/news/time/morocco-ends-dst-early-2008.html
# https://www.timeanddate.com/news/time/morocco-ends-dst-early-2008.html
# From Steffen Thorsen (2009-03-17):
# Morocco will observe DST from 2009-06-01 00:00 to 2009-08-21 00:00 according
@ -694,7 +694,7 @@ Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis
# (French)
#
# Our summary:
# http://www.timeanddate.com/news/time/morocco-starts-dst-2009.html
# https://www.timeanddate.com/news/time/morocco-starts-dst-2009.html
# From Alexander Krivenyshev (2009-03-17):
# Here is a link to official document from Royaume du Maroc Premier Ministre,
@ -717,7 +717,7 @@ Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis
# http://www.lavieeco.com/actualites/4099-le-maroc-passera-a-l-heure-d-ete-gmt1-le-2-mai.html
# (French)
# Our page:
# http://www.timeanddate.com/news/time/morocco-starts-dst-2010.html
# https://www.timeanddate.com/news/time/morocco-starts-dst-2010.html
# From Dan Abitol (2011-03-30):
# ...Rules for Africa/Casablanca are the following (24h format)
@ -734,7 +734,7 @@ Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis
# They said that the decision was already taken.
#
# More articles in the press
# http://www.yabiladi.com/articles/details/5058/secret-l-heure-d-ete-maroc-leve.html
# https://www.yabiladi.com/articles/details/5058/secret-l-heure-d-ete-maroc-leve.html
# http://www.lematin.ma/Actualite/Express/Article.asp?id=148923
# http://www.lavieeco.com/actualite/Le-Maroc-passe-sur-GMT%2B1-a-partir-de-dim
@ -826,7 +826,7 @@ Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis
# 1433 (18 April 2012) and the decision of the Head of Government of
# 16 N. 3-29-15 Chaaban 1435 (4 June 2015).
# Source (french):
# http://lnt.ma/le-maroc-reculera-dune-heure-le-dimanche-14-juin/
# https://lnt.ma/le-maroc-reculera-dune-heure-le-dimanche-14-juin/
#
# From Milamber (2015-06-09):
# http://www.mmsp.gov.ma/fr/actualites.aspx?id=863
@ -835,7 +835,7 @@ Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis
# [The gov.ma announcement] would (probably) make the switch on 2015-07-19 go
# from 03:00 to 04:00 rather than from 02:00 to 03:00, as in the patch....
# I think the patch is correct and the quoted text is wrong; the text in
# <http://lnt.ma/le-maroc-reculera-dune-heure-le-dimanche-14-juin/> agrees
# <https://lnt.ma/le-maroc-reculera-dune-heure-le-dimanche-14-juin/> agrees
# with the patch.
# From Paul Eggert (2015-06-08):
@ -960,9 +960,17 @@ Link Africa/Maputo Africa/Kigali # Rwanda
Link Africa/Maputo Africa/Lubumbashi # E Dem. Rep. of Congo
Link Africa/Maputo Africa/Lusaka # Zambia
# Namibia
# The 1994-04-03 transition is from Shanks & Pottenger.
# Shanks & Pottenger report no DST after 1998-04; go with IATA.
# From Arthur David Olson (2017-08-09):
# The text of the "Namibia Time Act, 1994" is available online at
# www.lac.org.na/laws/1994/811.pdf
# and includes this nugget:
# Notwithstanding the provisions of subsection (2) of section 1, the
# first winter period after the commencement of this Act shall
# commence at OOhOO on Monday 21 March 1994 and shall end at 02h00 on
# Sunday 4 September 1994.
# From Petronella Sibeene (2007-03-30):
# http://allafrica.com/stories/200703300178.html
@ -978,19 +986,30 @@ Link Africa/Maputo Africa/Lusaka # Zambia
# observes Botswana time, we have no details about historical practice.
# In the meantime people there can use Africa/Gaborone.
# See: Immanuel S. The Namibian. 2017-02-23.
# http://www.namibian.com.na/51480/read/Time-change-divides-lawmakers
# https://www.namibian.com.na/51480/read/Time-change-divides-lawmakers
# From Steffen Thorsen (2017-08-09):
# Namibia is going to change their time zone to what is now their DST:
# https://www.newera.com.na/2017/02/23/namibias-winter-time-might-be-repealed/
# This video is from the government decision:
# https://www.nbc.na/news/na-passes-namibia-time-bill-repealing-1994-namibia-time-act.8665
# We have made the assumption so far that they will change their time zone at
# the same time they would normally start DST, the first Sunday in September:
# https://www.timeanddate.com/news/time/namibia-new-time-zone.html
# RULE NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Namibia 1994 max - Sep Sun>=1 2:00 1:00 S
Rule Namibia 1995 max - Apr Sun>=1 2:00 0 -
Rule Namibia 1994 only - Mar 21 0:00 0 -
Rule Namibia 1994 2016 - Sep Sun>=1 2:00 1:00 S
Rule Namibia 1995 2017 - Apr Sun>=1 2:00 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Africa/Windhoek 1:08:24 - LMT 1892 Feb 8
1:30 - +0130 1903 Mar
2:00 - SAST 1942 Sep 20 2:00
2:00 1:00 SAST 1943 Mar 21 2:00
2:00 - SAST 1990 Mar 21 # independence
2:00 - CAT 1994 Apr 3
1:00 Namibia WA%sT
2:00 - CAT 1994 Mar 21 0:00
1:00 Namibia WA%sT 2017 Sep 3 2:00
2:00 - CAT
# Niger
# See Africa/Lagos.
@ -1077,14 +1096,24 @@ Link Africa/Johannesburg Africa/Mbabane # Swaziland
# no information
# Sudan
#
# From <http://www.sunanews.net/sn13jane.html>
# Sudan News Agency (2000-01-13),
# also reported by Michaël De Beukelaer-Dossche via Steffen Thorsen:
# Clocks will be moved ahead for 60 minutes all over the Sudan as of noon
# Saturday.... This was announced Thursday by Caretaker State Minister for
# Manpower Abdul-Rahman Nur-Eddin.
# From Ahmed Atyya, National Telecommunications Corp. (NTC), Sudan (2017-10-17):
# ... the Republic of Sudan is going to change the time zone from (GMT+3:00)
# to (GMT+ 2:00) starting from Wednesday 1 November 2017.
#
# From Paul Eggert (2017-10-18):
# A scanned copy (in Arabic) of Cabinet Resolution No. 352 for the
# year 2017 can be found as an attachment in email today from Yahia
# Abdalla of NTC, archived at:
# https://mm.icann.org/pipermail/tz/2017-October/025333.html
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Sudan 1970 only - May 1 0:00 1:00 S
Rule Sudan 1970 1985 - Oct 15 0:00 0 -
@ -1093,10 +1122,14 @@ Rule Sudan 1972 1985 - Apr lastSun 0:00 1:00 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Africa/Khartoum 2:10:08 - LMT 1931
2:00 Sudan CA%sT 2000 Jan 15 12:00
3:00 - EAT
3:00 - EAT 2017 Nov 1
2:00 - CAT
# South Sudan
Link Africa/Khartoum Africa/Juba
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Africa/Juba 2:06:28 - LMT 1931
2:00 Sudan CA%sT 2000 Jan 15 12:00
3:00 - EAT
# Swaziland
# See Africa/Johannesburg.
@ -1134,11 +1167,11 @@ Link Africa/Khartoum Africa/Juba
# According to several news sources, Tunisia will not observe DST this year.
# (Arabic)
# http://www.elbashayer.com/?page=viewn&nid=42546
# http://www.babnet.net/kiwidetail-15295.asp
# https://www.babnet.net/kiwidetail-15295.asp
#
# We have also confirmed this with the US embassy in Tunisia.
# We have a wrap-up about this on the following page:
# http://www.timeanddate.com/news/time/tunisia-cancels-dst-2009.html
# https://www.timeanddate.com/news/time/tunisia-cancels-dst-2009.html
# From Alexander Krivenyshev (2009-03-17):
# Here is a link to Tunis Afrique Presse News Agency

View File

@ -49,7 +49,7 @@
# Heard Island, McDonald Islands (uninhabited)
# previously sealers and scientific personnel wintered
# Margaret Turner reports
# http://web.archive.org/web/20021204222245/http://www.dstc.qut.edu.au/DST/marg/daylight.html
# https://web.archive.org/web/20021204222245/http://www.dstc.qut.edu.au/DST/marg/daylight.html
# (1999-09-30) that they're UT +05, with no DST;
# presumably this is when they have visitors.
#
@ -70,7 +70,7 @@
# http://www.aad.gov.au/default.asp?casid=37079
#
# We have more background information here:
# http://www.timeanddate.com/news/time/antarctica-new-times.html
# https://www.timeanddate.com/news/time/antarctica-new-times.html
# From Steffen Thorsen (2010-03-10):
# We got these changes from the Australian Antarctic Division: ...
@ -85,7 +85,7 @@
# - Mawson station stays on UTC+5.
#
# Background:
# http://www.timeanddate.com/news/time/antartica-time-changes-2010.html
# https://www.timeanddate.com/news/time/antartica-time-changes-2010.html
# From Steffen Thorsen (2016-10-28):
# Australian Antarctica Division informed us that Casey changed time
@ -168,7 +168,7 @@ Zone Indian/Kerguelen 0 - -00 1950 # Port-aux-Français
#
# year-round base in the main continent
# Dumont d'Urville, Île des Pétrels, -6640+14001, since 1956-11
# <http://en.wikipedia.org/wiki/Dumont_d'Urville_Station> (2005-12-05)
# <https://en.wikipedia.org/wiki/Dumont_d'Urville_Station> (2005-12-05)
#
# Another base at Port-Martin, 50km east, began operation in 1947.
# It was destroyed by fire on 1952-01-14.

View File

@ -49,7 +49,7 @@
#
# For data circa 1899, a common source is:
# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94.
# http://www.jstor.org/stable/1774359
# https://www.jstor.org/stable/1774359
#
# For Russian data circa 1919, a source is:
# Byalokoz EL. New Counting of Time in Russia since July 1, 1919.
@ -98,8 +98,8 @@ Rule E-EurAsia 1996 max - Oct lastSun 0:00 0 -
Rule RussiaAsia 1981 1984 - Apr 1 0:00 1:00 S
Rule RussiaAsia 1981 1983 - Oct 1 0:00 0 -
Rule RussiaAsia 1984 1995 - Sep lastSun 2:00s 0 -
Rule RussiaAsia 1985 2011 - Mar lastSun 2:00s 1:00 S
Rule RussiaAsia 1996 2011 - Oct lastSun 2:00s 0 -
Rule RussiaAsia 1985 2010 - Mar lastSun 2:00s 1:00 S
Rule RussiaAsia 1996 2010 - Oct lastSun 2:00s 0 -
# Afghanistan
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
@ -132,13 +132,17 @@ Zone Asia/Kabul 4:36:48 - LMT 1890
# or
# (brief)
# http://www.worldtimezone.com/dst_news/dst_news_armenia03.html
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Armenia 2011 only - Mar lastSun 2:00s 1:00 S
Rule Armenia 2011 only - Oct lastSun 2:00s 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Yerevan 2:58:00 - LMT 1924 May 2
3:00 - +03 1957 Mar
4:00 RussiaAsia +04/+05 1991 Mar 31 2:00s
3:00 RussiaAsia +03/+04 1995 Sep 24 2:00s
4:00 - +04 1997
4:00 RussiaAsia +04/+05
4:00 RussiaAsia +04/+05 2011
4:00 Armenia +04/+05
# Azerbaijan
@ -150,7 +154,7 @@ Zone Asia/Yerevan 2:58:00 - LMT 1924 May 2
# From Steffen Thorsen (2016-03-17):
# ... the Azerbaijani Cabinet of Ministers has cancelled switching to
# daylight saving time....
# http://www.azernews.az/azerbaijan/94137.html
# https://www.azernews.az/azerbaijan/94137.html
# http://vestnikkavkaza.net/news/Azerbaijani-Cabinet-of-Ministers-cancels-daylight-saving-time.html
# http://en.apa.az/xeber_azerbaijan_abolishes_daylight_savings_ti_240862.html
@ -191,11 +195,11 @@ Zone Asia/Baku 3:19:24 - LMT 1924 May 2
# the 19th and 20th, and they have not set the end date yet.
#
# Some sources:
# http://in.reuters.com/article/southAsiaNews/idINIndia-40017620090601
# https://in.reuters.com/article/southAsiaNews/idINIndia-40017620090601
# http://bdnews24.com/details.php?id=85889&cid=2
#
# Our wrap-up:
# http://www.timeanddate.com/news/time/bangladesh-daylight-saving-2009.html
# https://www.timeanddate.com/news/time/bangladesh-daylight-saving-2009.html
# From A. N. M. Kamrus Saadat (2009-06-15):
# Finally we've got the official mail regarding DST start time where DST start
@ -281,9 +285,15 @@ Zone Asia/Brunei 7:39:40 - LMT 1926 Mar # Bandar Seri Begawan
# Milne says 6:24:40 was the meridian of the time ball observatory at Rangoon.
# From Paul Eggert (2017-04-20):
# Page 27 of Reed & Low (cited for Asia/Kolkata) says "Rangoon local time is
# used upon the railways and telegraphs of Burma, and is 6h. 24m. 47s. ahead
# of Greenwich." This refers to the period before Burma's transition to +0630,
# a transition for which Shanks is the only source.
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Yangon 6:24:40 - LMT 1880 # or Rangoon
6:24:40 - RMT 1920 # Rangoon Mean Time?
Zone Asia/Yangon 6:24:47 - LMT 1880 # or Rangoon
6:24:47 - RMT 1920 # Rangoon local time
6:30 - +0630 1942 May
9:00 - +09 1945 May 3
6:30 - +0630
@ -340,7 +350,7 @@ Rule PRC 1987 1991 - Apr Sun>=10 0:00 1:00 D
#
# From Jesper Nørgaard Welen (2006-07-14):
# I have investigated the timezones around 1970 on the
# http://www.astro.com/atlas site [with provinces and county
# https://www.astro.com/atlas site [with provinces and county
# boundaries summarized below].... A few other exceptions were two
# counties on the Sichuan side of the Xizang-Sichuan border,
# counties Dege and Baiyu which lies on the Sichuan side and are
@ -492,7 +502,7 @@ Rule PRC 1987 1991 - Apr Sun>=10 0:00 1:00 D
# From David Cochrane (2014-03-26):
# Just a confirmation that Ürümqi time was implemented in Ürümqi on 1 Feb 1986:
# http://content.time.com/time/magazine/article/0,9171,960684,00.html
# https://content.time.com/time/magazine/article/0,9171,960684,00.html
# From Luther Ma (2014-04-22):
# I have interviewed numerous people of various nationalities and from
@ -649,7 +659,7 @@ Zone Asia/Hong_Kong 7:36:42 - LMT 1904 Oct 30
# (both in Okinawa) adopt the Western Standard Time which is based on
# 120E. The adoption began from Jan 1, 1896. The original text can be
# found on Wikisource:
# http://ja.wikisource.org/wiki/標準時ニ關スル件_(公布時)
# https://ja.wikisource.org/wiki/標準時ニ關スル件_(公布時)
# ... This could be the first adoption of time zone in Taiwan, because
# during the Qing Dynasty, it seems that there was no time zone
# declared officially.
@ -662,7 +672,7 @@ Zone Asia/Hong_Kong 7:36:42 - LMT 1904 Oct 30
# territory, including later occupations, adopt Japan Central Time
# (UTC+9). The adoption began on Oct 1, 1937. The original text can
# be found on Wikisource:
# http://ja.wikisource.org/wiki/明治二十八年勅令第百六十七號標準時ニ關スル件中改正ノ件
# https://ja.wikisource.org/wiki/明治二十八年勅令第百六十七號標準時ニ關スル件中改正ノ件
#
# That is, the time zone of Taipei switched to UTC+9 on Oct 1, 1937.
@ -798,6 +808,12 @@ Zone Asia/Macau 7:34:20 - LMT 1912 Jan 1
# Looks like the time zone split in Cyprus went through last night.
# http://cyprus-mail.com/2016/10/30/cyprus-new-division-two-time-zones-now-reality/
# From Paul Eggert (2017-10-18):
# Northern Cyprus will reinstate winter time on October 29, thus
# staying in sync with the rest of Cyprus. See: Anastasiou A.
# Cyprus to remain united in time. Cyprus Mail 2017-10-17.
# https://cyprus-mail.com/2017/10/17/cyprus-remain-united-time/
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Cyprus 1975 only - Apr 13 0:00 1:00 S
Rule Cyprus 1975 only - Oct 12 0:00 0 -
@ -815,7 +831,8 @@ Zone Asia/Nicosia 2:13:28 - LMT 1921 Nov 14
Zone Asia/Famagusta 2:15:48 - LMT 1921 Nov 14
2:00 Cyprus EE%sT 1998 Sep
2:00 EUAsia EE%sT 2016 Sep 8
3:00 - +03
3:00 - +03 2017 Oct 29 1:00u
2:00 EUAsia EE%sT
# Classically, Cyprus belongs to Asia; e.g. see Herodotus, Histories, I.72.
# However, for various reasons many users expect to find it under Europe.
@ -875,7 +892,7 @@ Zone Asia/Tbilisi 2:59:11 - LMT 1880
# From João Carrascalão, brother of the former governor of East Timor, in
# East Timor may be late for its millennium
# <http://etan.org/et99c/december/26-31/30ETMAY.htm> (1999-12-26/31):
# <https://etan.org/et99c/december/26-31/30ETMAY.htm> (1999-12-26/31):
# Portugal tried to change the time forward in 1974 because the sun
# rises too early but the suggestion raised a lot of problems with the
# Timorese and I still don't think it would work today because it
@ -903,21 +920,62 @@ Zone Asia/Dili 8:22:20 - LMT 1912 Jan 1
# India
# From Ian P. Beacock, in "A brief history of (modern) time", The Atlantic
# http://www.theatlantic.com/technology/archive/2015/12/the-creation-of-modern-time/421419/
# https://www.theatlantic.com/technology/archive/2015/12/the-creation-of-modern-time/421419/
# (2015-12-22):
# In January 1906, several thousand cotton-mill workers rioted on the
# outskirts of Bombay.... They were protesting the proposed abolition of
# local time in favor of Indian Standard Time.... Journalists called this
# dispute the "Battle of the Clocks." It lasted nearly half a century.
# From Paul Eggert (2017-04-20):
# Good luck trying to nail down old timekeeping records in India.
# "... in the nineteenth century ... Madras Observatory took its magnetic
# measurements on Göttingen time, its meteorological measurements on Madras
# (local) time, dropped its time ball on Greenwich (ocean navigator's) time,
# and distributed civil (local time)." -- Bartky IR. Selling the true time:
# 19th-century timekeeping in america. Stanford U Press (2000), 247 note 19.
# "A more potent cause of resistance to the general adoption of the present
# standard time lies in the fact that it is Madras time. The citizen of
# Bombay, proud of being 'primus in Indis' and of Calcutta, equally proud of
# his city being the Capital of India, and - for a part of the year - the Seat
# of the Supreme Government, alike look down on Madras, and refuse to change
# the time they are using, for that of what they regard as a benighted
# Presidency; while Madras, having for long given the standard time to the
# rest of India, would resist the adoption of any other Indian standard in its
# place." -- Oldham RD. On Time in India: a suggestion for its improvement.
# Proceedings of the Asiatic Society of Bengal (April 1899), 49-55.
#
# "In 1870 ... Madras time - 'now used by the telegraph and regulated from the
# only government observatory' - was suggested as a standard railway time,
# first to be adopted on the Great Indian Peninsular Railway (GIPR)....
# Calcutta, Bombay, and Karachi, were to be allowed to continue with their
# local time for civil purposes." - Prasad R. Tracks of Change: Railways and
# Everyday Life in Colonial India. Cambridge University Press (2016), 145.
#
# Reed S, Low F. The Indian Year Book 1936-37. Bennett, Coleman, pp 27-8.
# https://archive.org/details/in.ernet.dli.2015.282212
# This lists +052110 as Madras local time used in railways, and says that on
# 1906-01-01 railways and telegraphs in India switched to +0530. Some
# municipalities retained their former time, and the time in Calcutta
# continued to depend on whether you were at the railway station or at
# government offices. Government time was at +055320 (according to Shanks) or
# at +0554 (according to the Indian Year Book). Railway time is more
# appropriate for our purposes, as it was better documented, it is what we do
# elsewhere (e.g., Europe/London before 1880), and after 1906 it was
# consistent in the region now identified by Asia/Kolkata. So, use railway
# time for 1870-1941. Shanks is our only (and dubious) source for the
# 1941-1945 data.
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Kolkata 5:53:28 - LMT 1880 # Kolkata
5:53:20 - HMT 1941 Oct # Howrah Mean Time?
6:30 - +0630 1942 May 15
Zone Asia/Kolkata 5:53:28 - LMT 1854 Jun 28 # Kolkata
5:53:20 - HMT 1870 # Howrah Mean Time?
5:21:10 - MMT 1906 Jan 1 # Madras local time
5:30 - IST 1941 Oct
5:30 1:00 +0630 1942 May 15
5:30 - IST 1942 Sep
5:30 1:00 +0630 1945 Oct 15
5:30 - IST
# The following are like Asia/Kolkata:
# Since 1970 the following are like Asia/Kolkata:
# Andaman Is
# Lakshadweep (Laccadive, Minicoy and Amindivi Is)
# Nicobar Is
@ -1059,7 +1117,7 @@ Zone Asia/Jayapura 9:22:48 - LMT 1932 Nov
# From Reuters (2007-09-16), with a heads-up from Jesper Nørgaard Welen:
# ... the Guardian Council ... approved a law on Sunday to re-introduce
# daylight saving time ...
# http://uk.reuters.com/article/oilRpt/idUKBLA65048420070916
# https://uk.reuters.com/article/oilRpt/idUKBLA65048420070916
#
# From Roozbeh Pournader (2007-11-05):
# This is quoted from Official Gazette of the Islamic Republic of
@ -1158,7 +1216,7 @@ Zone Asia/Tehran 3:25:44 - LMT 1916
# http://www.aswataliraq.info/look/article.tpl?id=2047&IdLanguage=17&IdPublication=4&NrArticle=71743&NrIssue=1&NrSection=10
#
# We have published a short article in English about the change:
# http://www.timeanddate.com/news/time/iraq-dumps-daylight-saving.html
# https://www.timeanddate.com/news/time/iraq-dumps-daylight-saving.html
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Iraq 1982 only - May 1 0:00 1:00 D
@ -1466,12 +1524,12 @@ Rule Japan 1950 1951 - May Sun>=1 2:00 1:00 D
# From Yu-Cheng Chuang (2013-07-12):
# ...the Meiji Emperor announced Ordinance No. 167 of Meiji Year 28 "The clause
# about standard time" ... The adoption began from Jan 1, 1896.
# http://ja.wikisource.org/wiki/標準時ニ關スル件_(公布時)
# https://ja.wikisource.org/wiki/標準時ニ關スル件_(公布時)
#
# ...the Showa Emperor announced Ordinance No. 529 of Showa Year 12 ... which
# means the whole Japan territory, including later occupations, adopt Japan
# Central Time (UTC+9). The adoption began on Oct 1, 1937.
# http://ja.wikisource.org/wiki/明治二十八年勅令第百六十七號標準時ニ關スル件中改正ノ件
# https://ja.wikisource.org/wiki/明治二十八年勅令第百六十七號標準時ニ關スル件中改正ノ件
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Tokyo 9:18:59 - LMT 1887 Dec 31 15:00u
@ -1533,7 +1591,7 @@ Zone Asia/Tokyo 9:18:59 - LMT 1887 Dec 31 15:00u
# Official, in Arabic:
# http://www.petra.gov.jo/public_news/Nws_NewsDetails.aspx?Menu_ID=&Site_Id=2&lang=1&NewsID=133230&CatID=14
# ... Our background/permalink about it
# http://www.timeanddate.com/news/time/jordan-reverses-dst-decision.html
# https://www.timeanddate.com/news/time/jordan-reverses-dst-decision.html
# ...
# http://www.petra.gov.jo/Public_News/Nws_NewsDetails.aspx?lang=2&site_id=1&NewsID=133313&Type=P
# ... says midnight for the coming one and 1:00 for the ones in the future
@ -1891,9 +1949,9 @@ Zone Asia/Bishkek 4:58:24 - LMT 1924 May 2
# between 1987 and 1988 ...
# From Sanghyuk Jung (2014-10-29):
# http://mm.icann.org/pipermail/tz/2014-October/021830.html
# https://mm.icann.org/pipermail/tz/2014-October/021830.html
# According to the Korean Wikipedia
# http://ko.wikipedia.org/wiki/한국_표준시
# https://ko.wikipedia.org/wiki/한국_표준시
# [oldid=12896437 2014-09-04 08:03 UTC]
# DST in Republic of Korea was as follows.... And I checked old
# newspapers in Korean, all articles correspond with data in Wikipedia.
@ -2115,7 +2173,7 @@ Zone Indian/Maldives 4:54:00 - LMT 1880 # Male
# +08:00 instead. Different sources appear to disagree with the tz
# database on this, e.g.:
#
# http://www.timeanddate.com/worldclock/city.html?n=1026
# https://www.timeanddate.com/worldclock/city.html?n=1026
# http://www.worldtimeserver.com/current_time_in_MN.aspx
#
# both say GMT+08:00.
@ -2245,7 +2303,7 @@ Zone Asia/Kathmandu 5:41:16 - LMT 1920
# help reduce load shedding by approving the closure of commercial centres at
# 9pm and moving clocks forward by one hour for the next three months. ...."
#
# http://www.worldtimezone.net/dst_news/dst_news_pakistan01.html
# http://www.worldtimezone.com/dst_news/dst_news_pakistan01.html
# http://www.dailytimes.com.pk/default.asp?page=2008%5C05%5C15%5Cstory_15-5-2008_pg1_4
# From Arthur David Olson (2008-05-19):
@ -2311,7 +2369,7 @@ Zone Asia/Kathmandu 5:41:16 - LMT 1920
#
# We have confirmed this year's end date with both with the Ministry of
# Water and Power and the Pakistan Electric Power Company:
# http://www.timeanddate.com/news/time/pakistan-ends-dst09.html
# https://www.timeanddate.com/news/time/pakistan-ends-dst09.html
# From Christoph Göhre (2009-10-01):
# [T]he German Consulate General in Karachi reported me today that Pakistan
@ -2493,7 +2551,7 @@ Zone Asia/Karachi 4:28:12 - LMT 1907
#
# We are not sure if Gaza will do the same, last year they had a different
# end date, we will keep this page updated:
# http://www.timeanddate.com/news/time/westbank-gaza-dst-2009.html
# https://www.timeanddate.com/news/time/westbank-gaza-dst-2009.html
# From Alexander Krivenyshev (2009-09-02):
# Seems that Gaza Strip will go back to Winter Time same date as West Bank.
@ -2531,7 +2589,7 @@ Zone Asia/Karachi 4:28:12 - LMT 1907
# the clocks were set back one hour at 2010-08-11 00:00:00 local time in
# Gaza and the West Bank.
# Some more background info:
# http://www.timeanddate.com/news/time/westbank-gaza-end-dst-2010.html
# https://www.timeanddate.com/news/time/westbank-gaza-end-dst-2010.html
# From Steffen Thorsen (2011-08-26):
# Gaza and the West Bank did go back to standard time in the beginning of
@ -2541,7 +2599,7 @@ Zone Asia/Karachi 4:28:12 - LMT 1907
#
# http://www.maannews.net/eng/ViewDetails.aspx?ID=416217
# Additional info:
# http://www.timeanddate.com/news/time/palestine-dst-2011.html
# https://www.timeanddate.com/news/time/palestine-dst-2011.html
# From Alexander Krivenyshev (2011-08-27):
# According to the article in The Jerusalem Post:
@ -2551,7 +2609,7 @@ Zone Asia/Karachi 4:28:12 - LMT 1907
# The Hamas government said on Saturday that it won't observe summertime after
# the Muslim feast of Id al-Fitr, which begins on Tuesday..."
# ...
# http://www.jpost.com/MiddleEast/Article.aspx?id=235650
# https://www.jpost.com/MiddleEast/Article.aspx?id=235650
# http://www.worldtimezone.com/dst_news/dst_news_gazastrip05.html
# The rules for Egypt are stolen from the 'africa' file.
@ -2572,7 +2630,7 @@ Zone Asia/Karachi 4:28:12 - LMT 1907
# http://safa.ps/details/news/74352/%D8%A8%D8%AF%D8%A1-%D8%A7%D9%84%D8%AA%D9%88%D9%82%D9%8A%D8%AA-%D8%A7%D9%84%D8%B5%D9%8A%D9%81%D9%8A-%D8%A8%D8%A7%D9%84%D8%B6%D9%81%D8%A9-%D9%88%D8%BA%D8%B2%D8%A9-%D9%84%D9%8A%D9%84%D8%A9-%D8%A7%D9%84%D8%AC%D9%85%D8%B9%D8%A9.html
#
# Our brief summary:
# http://www.timeanddate.com/news/time/gaza-west-bank-dst-2012.html
# https://www.timeanddate.com/news/time/gaza-west-bank-dst-2012.html
# From Steffen Thorsen (2013-03-26):
# The following news sources tells that Palestine will "start daylight saving
@ -2592,11 +2650,11 @@ Zone Asia/Karachi 4:28:12 - LMT 1907
# From Steffen Thorsen (2015-03-03):
# Sources such as http://www.alquds.com/news/article/view/id/548257
# and http://www.raya.ps/ar/news/890705.html say Palestine areas will
# and https://www.raya.ps/ar/news/890705.html say Palestine areas will
# start DST on 2015-03-28 00:00 which is one day later than expected.
#
# From Paul Eggert (2015-03-03):
# http://www.timeanddate.com/time/change/west-bank/ramallah?year=2014
# https://www.timeanddate.com/time/change/west-bank/ramallah?year=2014
# says that the fall 2014 transition was Oct 23 at 24:00.
# From Hannah Kreitem (2016-03-09):
@ -2620,8 +2678,8 @@ Zone Asia/Karachi 4:28:12 - LMT 1907
#
# From Paul Eggert (2016-10-19):
# It's also consistent with predictions in the following URLs today:
# http://www.timeanddate.com/time/change/gaza-strip/gaza
# http://www.timeanddate.com/time/change/west-bank/hebron
# https://www.timeanddate.com/time/change/gaza-strip/gaza
# https://www.timeanddate.com/time/change/west-bank/hebron
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule EgyptAsia 1957 only - May 10 0:00 1:00 S
@ -2684,7 +2742,7 @@ Zone Asia/Hebron 2:20:23 - LMT 1900 Oct
# Philippines, issued a proclamation announcing that 1844-12-30 was to
# be immediately followed by 1845-01-01; see R.H. van Gent's
# History of the International Date Line
# http://www.staff.science.uu.nl/~gent0113/idl/idl_philippines.htm
# https://www.staff.science.uu.nl/~gent0113/idl/idl_philippines.htm
# The rest of the data entries are from Shanks & Pottenger.
# From Jesper Nørgaard Welen (2006-04-26):
@ -2948,7 +3006,7 @@ Rule Syria 2007 only - Nov Fri>=1 0:00 0 -
# We have not found any sources saying anything about when DST ends this year.
#
# Our summary
# http://www.timeanddate.com/news/time/syria-dst-starts-march-27-2009.html
# https://www.timeanddate.com/news/time/syria-dst-starts-march-27-2009.html
# From Steffen Thorsen (2009-10-27):
# The Syrian Arab News Network on 2009-09-29 reported that Syria will
@ -2975,7 +3033,7 @@ Rule Syria 2007 only - Nov Fri>=1 0:00 0 -
# http://www.sana.sy/ara/2/2012/03/26/408215.htm
#
# Our brief summary:
# http://www.timeanddate.com/news/time/syria-dst-2012.html
# https://www.timeanddate.com/news/time/syria-dst-2012.html
# From Arthur David Olson (2012-03-27):
# Assume last Friday in March going forward XXX.
@ -3058,7 +3116,7 @@ Zone Asia/Tashkent 4:37:11 - LMT 1924 May 2
# is quoted verbatim in:
# http://www.thoigian.com.vn/?mPage=P80D01
# is translated by Brian Inglis in:
# http://mm.icann.org/pipermail/tz/2014-October/021654.html
# https://mm.icann.org/pipermail/tz/2014-October/021654.html
# and is the basis for the information below.
#
# The 1906 transition was effective July 1 and standardized Indochina to

View File

@ -316,7 +316,7 @@ Zone Indian/Cocos 6:27:40 - LMT 1900
# http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=1096:3310-cabinet-approves-change-in-daylight-savings-dates&catid=49:cabinet-releases&Itemid=166
#
# A bit more background info here:
# http://www.timeanddate.com/news/time/fiji-dst-ends-march-2010.html
# https://www.timeanddate.com/news/time/fiji-dst-ends-march-2010.html
# From Alexander Krivenyshev (2010-10-24):
# According to Radio Fiji and Fiji Times online, Fiji will end DST 3
@ -380,9 +380,12 @@ Zone Indian/Cocos 6:27:40 - LMT 1900
# clocks go forward an hour at 2am to 3am.... Daylight Saving will
# end at 3.00am on Sunday 15th January 2017."
# From Paul Eggert (2016-10-03):
# For now, guess DST from 02:00 the first Sunday in November to
# 03:00 the third Sunday in January. Although ad hoc, it matches
# From Paul Eggert (2017-08-21):
# Dominic Fok writes (2017-08-20) that DST ends 2018-01-14, citing
# Extraordinary Government of Fiji Gazette Supplement No. 21 (2017-08-27),
# [Legal Notice No. 41] of an order of the previous day by J Usamate.
# For now, guess DST from 02:00 the first Sunday in November to 03:00
# the first Sunday on or after January 14. Although ad hoc, it matches
# transitions since late 2014 and seems more likely to match future
# practice than guessing no DST.
@ -396,7 +399,7 @@ Rule Fiji 2011 only - Mar Sun>=1 3:00 0 -
Rule Fiji 2012 2013 - Jan Sun>=18 3:00 0 -
Rule Fiji 2014 only - Jan Sun>=18 2:00 0 -
Rule Fiji 2014 max - Nov Sun>=1 2:00 1:00 S
Rule Fiji 2015 max - Jan Sun>=15 3:00 0 -
Rule Fiji 2015 max - Jan Sun>=14 3:00 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Pacific/Fiji 11:55:44 - LMT 1915 Oct 26 # Suva
12:00 Fiji +12/+13
@ -580,7 +583,7 @@ Zone Pacific/Port_Moresby 9:48:40 - LMT 1880
# The World War II entries below are instead based on Arawa-Kieta.
# The Japanese occupied Kieta in July 1942,
# according to the Pacific War Online Encyclopedia
# http://pwencycl.kgbudge.com/B/o/Bougainville.htm
# https://pwencycl.kgbudge.com/B/o/Bougainville.htm
# and seem to have controlled it until their 1945-08-21 surrender.
#
# The Autonomous Region of Bougainville switched from UT +10 to +11
@ -602,7 +605,7 @@ Zone Pacific/Pitcairn -8:40:20 - LMT 1901 # Adamstown
-8:00 - -08
# American Samoa
Zone Pacific/Pago_Pago 12:37:12 - LMT 1879 Jul 5
Zone Pacific/Pago_Pago 12:37:12 - LMT 1892 Jul 5
-11:22:48 - LMT 1911
-11:00 - SST # S=Samoa
Link Pacific/Pago_Pago Pacific/Midway # in US minor outlying islands
@ -618,7 +621,7 @@ Link Pacific/Pago_Pago Pacific/Midway # in US minor outlying islands
# Sunday of April 2011."
#
# Background info:
# http://www.timeanddate.com/news/time/samoa-dst-plan-2009.html
# https://www.timeanddate.com/news/time/samoa-dst-plan-2009.html
#
# Samoa's Daylight Saving Time Act 2009 is available here, but does not
# contain any dates:
@ -682,7 +685,7 @@ Rule WS 2011 only - Sep lastSat 3:00 1 D
Rule WS 2012 max - Apr Sun>=1 4:00 0 S
Rule WS 2012 max - Sep lastSun 3:00 1 D
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Pacific/Apia 12:33:04 - LMT 1879 Jul 5
Zone Pacific/Apia 12:33:04 - LMT 1892 Jul 5
-11:26:56 - LMT 1911
-11:30 - -1130 1950
-11:00 WS -11/-10 2011 Dec 29 24:00
@ -709,7 +712,7 @@ Zone Pacific/Guadalcanal 10:39:48 - LMT 1912 Oct # Honiara
# From Paul Eggert (2012-07-25)
# A Google Books snippet of Appendix to the Journals of the House of
# Representatives of New Zealand, Session 1948,
# <http://books.google.com/books?id=ZaVCAQAAIAAJ>, page 65, says Tokelau
# <https://books.google.com/books?id=ZaVCAQAAIAAJ>, page 65, says Tokelau
# was "11 hours slow on G.M.T." Go with Thorsen and assume Shanks & Pottenger
# are off by an hour starting in 1901.
@ -724,8 +727,8 @@ Rule Tonga 1999 only - Oct 7 2:00s 1:00 S
Rule Tonga 2000 only - Mar 19 2:00s 0 -
Rule Tonga 2000 2001 - Nov Sun>=1 2:00 1:00 S
Rule Tonga 2001 2002 - Jan lastSun 2:00 0 -
Rule Tonga 2016 max - Nov Sun>=1 2:00 1:00 S
Rule Tonga 2017 max - Jan Sun>=15 3:00 0 -
Rule Tonga 2016 only - Nov Sun>=1 2:00 1:00 S
Rule Tonga 2017 only - Jan Sun>=15 3:00 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Pacific/Tongatapu 12:19:20 - LMT 1901
12:20 - +1220 1941
@ -779,7 +782,7 @@ Zone Pacific/Funafuti 11:56:52 - LMT 1901
# Operation Fishbowl shot (Tightrope, 1962-11-04).... [See] Herman Hoerlin,
# "The United States High-Altitude Test Experience: A Review Emphasizing the
# Impact on the Environment", Los Alamos LA-6405, Oct 1976.
# http://www.fas.org/sgp/othergov/doe/lanl/docs1/00322994.pdf
# https://www.fas.org/sgp/othergov/doe/lanl/docs1/00322994.pdf
# See the table on page 4 where he lists GMT and local times for the tests; a
# footnote for the JI tests reads that local time is "JI time = Hawaii Time
# Minus One Hour".
@ -845,7 +848,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
#
# For data circa 1899, a common source is:
# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94.
# http://www.jstor.org/stable/1774359
# https://www.jstor.org/stable/1774359
#
# A reliable and entertaining source about time zones is
# Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997).
@ -992,7 +995,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# AEST ACST AWST AEDT ACDT
#
# Parliamentary Library (2008-11-10)
# http://www.aph.gov.au/binaries/library/pubs/rp/2008-09/09rp14.pdf
# https://www.aph.gov.au/binaries/library/pubs/rp/2008-09/09rp14.pdf
# EST CST WST preferred for standard time; AEST AEDT ACST ACDT also used
#
# The Transport Safety Bureau has an extensive series of accident reports,
@ -1028,13 +1031,13 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
#
# NSW (including LHI and Broken Hill):
# Standard Time Act 1987 (updated 1995-04-04)
# http://www.austlii.edu.au/au/legis/nsw/consol_act/sta1987137/index.html
# https://www.austlii.edu.au/au/legis/nsw/consol_act/sta1987137/index.html
# ACT
# Standard Time and Summer Time Act 1972
# http://www.austlii.edu.au/au/legis/act/consol_act/stasta1972279/index.html
# https://www.austlii.edu.au/au/legis/act/consol_act/stasta1972279/index.html
# SA
# Standard Time Act, 1898
# http://www.austlii.edu.au/au/legis/sa/consol_act/sta1898137/index.html
# https://www.austlii.edu.au/au/legis/sa/consol_act/sta1898137/index.html
# From David Grosz (2005-06-13):
# It was announced last week that Daylight Saving would be extended by
@ -1329,7 +1332,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# http://abc.net.au/news/regionals/neweng/monthly/regeng-22jul1999-1.htm
# (1999-07-22). For now, we'll wait to see if this really happens.
#
# Victoria will following NSW. See:
# Victoria will follow NSW. See:
# Vic to extend daylight saving (1999-07-28)
# http://abc.net.au/local/news/olympics/1999/07/item19990728112314_1.htm
#
@ -1432,7 +1435,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# the ACT for all 52 weeks of the year...
#
# We have a wrap-up here:
# http://www.timeanddate.com/news/time/south-australia-extends-dst.html
# https://www.timeanddate.com/news/time/south-australia-extends-dst.html
###############################################################################
# New Zealand
@ -1486,7 +1489,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# From Paul Eggert (2014-07-14):
# Chatham Island time was formally standardized on 1957-01-01 by
# New Zealand's Standard Time Amendment Act 1956 (1956-10-26).
# http://www.austlii.edu.au/nz/legis/hist_act/staa19561956n100244.pdf
# https://www.austlii.edu.au/nz/legis/hist_act/staa19561956n100244.pdf
# According to Google Books snippet view, a speaker in the New Zealand
# parliamentary debates in 1956 said "Clause 78 makes provision for standard
# time in the Chatham Islands. The time there is 45 minutes in advance of New
@ -1601,7 +1604,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# the Norfolk Island Museum and the Australian Bureau of Meteorology's
# Norfolk Island station, and found no record of Norfolk observing DST
# other than in 1974/5. See:
# http://www.timeanddate.com/time/australia/norfolk-island.html
# https://www.timeanddate.com/time/australia/norfolk-island.html
# Pitcairn
@ -1629,11 +1632,13 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# (Western) Samoa and American Samoa
# Howse writes (p 153, citing p 10 of the 1883-11-18 New York Herald)
# that in 1879 the King of Samoa decided to change
# Howse writes (p 153) that after the 1879 standardization on Antipodean
# time by the British governor of Fiji, the King of Samoa decided to change
# "the date in his kingdom from the Antipodean to the American system,
# ordaining - by a masterpiece of diplomatic flattery - that
# the Fourth of July should be celebrated twice in that year."
# This happened in 1892, according to the Evening News (Sydney) of 1892-07-20.
# https://www.staff.science.uu.nl/~gent0113/idl/idl.htm
# Although Shanks & Pottenger says they both switched to UT -11:30
# in 1911, and to -11 in 1950. many earlier sources give -11
@ -1644,6 +1649,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# day in 2011. Assume also that the Samoas follow the US and New
# Zealand's "ST"/"DT" style of daylight-saving abbreviations.
# Tonga
# From Paul Eggert (1996-01-22):
@ -1738,6 +1744,15 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# Assume Tonga will observe DST from the first Sunday in November at 02:00
# through the third Sunday in January at 03:00, like Fiji, for now.
# From David Wade (2017-10-18):
# In August government was disolved by the King. The current prime minister
# continued in office in care taker mode. It is easy to see that few
# decisions will be made until elections 16th November.
#
# From Paul Eggert (2017-10-18):
# For now, guess that DST is discontinued. That's what the IATA is guessing.
# Wake
# From Vernice Anderson, Personal Secretary to Philip Jessup,
@ -1750,7 +1765,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# making calculation of time in Washington difficult if not almost
# impossible.
#
# http://www.trumanlibrary.org/wake/meeting.htm
# https://www.trumanlibrary.org/oralhist/andrsonv.htm
# From Paul Eggert (2003-03-23):
# We have no other report of DST in Wake Island, so omit this info for now.
@ -1778,7 +1793,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# an international standard, there are some places on the high seas where the
# correct date is ambiguous.
# From Wikipedia <http://en.wikipedia.org/wiki/Time_zone> (2005-08-31):
# From Wikipedia <https://en.wikipedia.org/wiki/Time_zone> (2005-08-31):
# Before 1920, all ships kept local apparent time on the high seas by setting
# their clocks at night or at the morning sight so that, given the ship's
# speed and direction, it would be 12 o'clock when the Sun crossed the ship's

View File

@ -84,7 +84,9 @@ Link America/Sao_Paulo Brazil/East
Link America/Manaus Brazil/West
Link America/Halifax Canada/Atlantic
Link America/Winnipeg Canada/Central
Link America/Regina Canada/East-Saskatchewan
# This line is commented out, as the name exceeded the 14-character limit
# and was an unused misnomer.
#Link America/Regina Canada/East-Saskatchewan
Link America/Toronto Canada/Eastern
Link America/Edmonton Canada/Mountain
Link America/St_Johns Canada/Newfoundland

View File

@ -60,14 +60,14 @@
# [PDF] (1914-03)
#
# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94
# <http://www.jstor.org/stable/1774359>. He writes:
# <https://www.jstor.org/stable/1774359>. He writes:
# "It is requested that corrections and additions to these tables
# may be sent to Mr. John Milne, Royal Geographical Society,
# Savile Row, London." Nowadays please email them to tz@iana.org.
#
# Byalokoz EL. New Counting of Time in Russia since July 1, 1919.
# This Russian-language source was consulted by Vladimir Karpinsky; see
# http://mm.icann.org/pipermail/tz/2014-August/021320.html
# https://mm.icann.org/pipermail/tz/2014-August/021320.html
# The full Russian citation is:
# Бялокоз, Евгений Людвигович. Новый счет времени в течении суток
# введенный декретом Совета народных комиссаров для всей России с 1-го
@ -210,7 +210,7 @@
# foundations of civilization throughout the world.
# -- "A Silent Toast to William Willett", Pictorial Weekly;
# republished in Finest Hour (Spring 2002) 1(114):26
# http://www.winstonchurchill.org/images/finesthour/Vol.01%20No.114.pdf
# https://www.winstonchurchill.org/publications/finest-hour/finest-hour-114/a-silent-toast-to-william-willett-by-winston-s-churchill
# From Paul Eggert (2015-08-08):
# The OED Supplement says that the English originally said "Daylight Saving"
@ -248,8 +248,8 @@
# official designation; the reply of the 21st was that there wasn't
# but he couldn't think of anything better than the "Double British
# Summer Time" that the BBC had been using informally.
# http://www.polyomino.org.uk/british-time/bbc-19410418.png
# http://www.polyomino.org.uk/british-time/ho-19410421.png
# https://www.polyomino.org.uk/british-time/bbc-19410418.png
# https://www.polyomino.org.uk/british-time/ho-19410421.png
# From Sir Alexander Maxwell in the above-mentioned letter (1941-04-21):
# [N]o official designation has as far as I know been adopted for the time
@ -266,13 +266,13 @@
# the history of summer time legislation in the United Kingdom.
# Since 1998 Joseph S. Myers has been updating
# and extending this list, which can be found in
# http://www.polyomino.org.uk/british-time/
# https://www.polyomino.org.uk/british-time/
# From Joseph S. Myers (1998-01-06):
#
# The legal time in the UK outside of summer time is definitely GMT, not UTC;
# see Lord Tanlaw's speech
# http://www.publications.parliament.uk/pa/ld199798/ldhansrd/vo970611/text/70611-10.htm#70611-10_head0
# https://www.publications.parliament.uk/pa/ld199798/ldhansrd/vo970611/text/70611-10.htm#70611-10_head0
# (Lords Hansard 11 June 1997 columns 964 to 976).
# From Paul Eggert (2006-03-22):
@ -318,7 +318,7 @@
# Irish 'public feeling (was) outraged by forcing of English time on us'."
# -- Parsons M. Dublin lost its time zone - and 25 minutes - after 1916 Rising.
# Irish Times 2014-10-27.
# http://www.irishtimes.com/news/politics/dublin-lost-its-time-zone-and-25-minutes-after-1916-rising-1.1977411
# https://www.irishtimes.com/news/politics/dublin-lost-its-time-zone-and-25-minutes-after-1916-rising-1.1977411
# From Joseph S. Myers (2005-01-26):
# Irish laws are available online at <http://www.irishstatutebook.ie>.
@ -371,6 +371,12 @@
# Justice (tel +353 1 678 9711) who confirmed to me that the correct name is
# "Irish Summer Time", abbreviated to "IST".
# Michael Deckers (2017-06-01) gave the following URLs for Ireland's
# Summer Time Act, 1925 and Summer Time Orders, 1926 and 1947:
# http://www.irishstatutebook.ie/eli/1925/act/8/enacted/en/print.html
# http://www.irishstatutebook.ie/eli/1926/sro/919/made/en/print.html
# http://www.irishstatutebook.ie/eli/1947/sro/71/made/en/print.html
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
# Summer Time Act, 1916
Rule GB-Eire 1916 only - May 21 2:00s 1:00 BST
@ -495,14 +501,14 @@ Link Europe/London Europe/Isle_of_Man
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Europe/Dublin -0:25:00 - LMT 1880 Aug 2
-0:25:21 - DMT 1916 May 21 2:00 # Dublin MT
-0:25:21 - DMT 1916 May 21 2:00s # Dublin MT
-0:25:21 1:00 IST 1916 Oct 1 2:00s
0:00 GB-Eire %s 1921 Dec 6 # independence
0:00 GB-Eire GMT/IST 1940 Feb 25 2:00
0:00 1:00 IST 1946 Oct 6 2:00
0:00 - GMT 1947 Mar 16 2:00
0:00 1:00 IST 1947 Nov 2 2:00
0:00 - GMT 1948 Apr 18 2:00
0:00 GB-Eire GMT/IST 1940 Feb 25 2:00s
0:00 1:00 IST 1946 Oct 6 2:00s
0:00 - GMT 1947 Mar 16 2:00s
0:00 1:00 IST 1947 Nov 2 2:00s
0:00 - GMT 1948 Apr 18 2:00s
0:00 GB-Eire GMT/IST 1968 Oct 27
1:00 - IST 1971 Oct 31 2:00u
0:00 GB-Eire GMT/IST 1996
@ -648,7 +654,7 @@ Rule Russia 1996 2010 - Oct lastSun 2:00s 0 -
# Council of Ministers of the USSR from 1989-03-14 No. 227.
#
# I did not find full texts of these acts. For the 1989 one we have
# title at http://base.garant.ru/70754136/ :
# title at https://base.garant.ru/70754136/ :
# "About change in calculation of time on the territories of
# Lithuanian SSR, Latvian SSR and Estonian SSR, Astrakhan,
# Kaliningrad, Kirov, Kuybyshev, Ulyanovsk and Uralsk oblasts".
@ -679,7 +685,7 @@ Rule Russia 1996 2010 - Oct lastSun 2:00s 0 -
# http://bmockbe.ru/events/?ID=7583
#
# Medvedev signed a law on the calculation of the time (in russian):
# http://www.regnum.ru/news/polit/1413906.html
# https://www.regnum.ru/news/polit/1413906.html
# From Arthur David Olson (2011-06-15):
# Take "abolishing daylight saving time" to mean that time is now considered
@ -806,7 +812,7 @@ Zone Europe/Vienna 1:05:21 - LMT 1893 Apr
# Sources (Russian language):
# http://www.belta.by/ru/all_news/society/V-Belarusi-otmenjaetsja-perexod-na-sezonnoe-vremja_i_572952.html
# http://naviny.by/rubrics/society/2011/09/16/ic_articles_116_175144/
# http://news.tut.by/society/250578.html
# https://news.tut.by/society/250578.html
#
# From Alexander Bokovoy (2014-10-09):
# Belarussian government decided against changing to winter time....
@ -1127,7 +1133,7 @@ Zone America/Thule -4:35:08 - LMT 1916 Jul 28 # Pituffik air base
# for their standard and summer times. He says no, they use "suveaeg"
# (summer time) and "talveaeg" (winter time).
# From The Baltic Times <http://www.baltictimes.com/> (1999-09-09)
# From The Baltic Times <https://www.baltictimes.com/> (1999-09-09)
# via Steffen Thorsen:
# This year will mark the last time Estonia shifts to summer time,
# a council of the ruling coalition announced Sept. 6....
@ -1179,7 +1185,7 @@ Zone Europe/Tallinn 1:39:00 - LMT 1880
# This is documented in Heikki Oja: Aikakirja 2007, published by The Almanac
# Office of University of Helsinki, ISBN 952-10-3221-9, available online (in
# Finnish) at
# http://almanakka.helsinki.fi/aikakirja/Aikakirja2007kokonaan.pdf
# https://almanakka.helsinki.fi/aikakirja/Aikakirja2007kokonaan.pdf
#
# Page 105 (56 in PDF version) has a handy table of all past daylight savings
# transitions. It is easy enough to interpret without Finnish skills.
@ -1192,7 +1198,7 @@ Zone Europe/Tallinn 1:39:00 - LMT 1880
# From Konstantin Hyppönen (2014-06-13):
# [Heikki Oja's book Aikakirja 2013]
# http://almanakka.helsinki.fi/images/aikakirja/Aikakirja2013kokonaan.pdf
# https://almanakka.helsinki.fi/images/aikakirja/Aikakirja2013kokonaan.pdf
# pages 104-105, including a scan from a newspaper published on Apr 2 1942
# say that ... [o]n Apr 2 1942, 24 o'clock (which means Apr 3 1942,
# 00:00), clocks were moved one hour forward. The newspaper
@ -1322,7 +1328,7 @@ Zone Europe/Paris 0:09:21 - LMT 1891 Mar 15 0:01
# From Jörg Schilling (2002-10-23):
# In 1945, Berlin was switched to Moscow Summer time (GMT+4) by
# http://www.dhm.de/lemo/html/biografien/BersarinNikolai/
# https://www.dhm.de/lemo/html/biografien/BersarinNikolai/
# General [Nikolai] Bersarin.
# From Paul Eggert (2003-03-08):
@ -1547,7 +1553,7 @@ Zone Atlantic/Reykjavik -1:28 - LMT 1908
# From Paul Eggert (2016-10-27):
# Go with INRiM for DST rules, except as corrected by Inglis for 1944
# for the Kingdom of Italy. This is consistent with Renzo Baldini.
# Model Rome's occupation by using using C-Eur rules from 1943-09-10
# Model Rome's occupation by using C-Eur rules from 1943-09-10
# to 1944-06-04; although Rome was an open city during this period, it
# was effectively controlled by Germany.
#
@ -1862,14 +1868,14 @@ Zone Europe/Malta 0:58:04 - LMT 1893 Nov 2 0:00s # Valletta
# Following Moldova and neighboring Ukraine- Transnistria (Pridnestrovie)-
# Tiraspol will go back to winter time on October 30, 2011.
# News from Moldova (in russian):
# http://ru.publika.md/link_317061.html
# https://ru.publika.md/link_317061.html
# From Roman Tudos (2015-07-02):
# http://lex.justice.md/index.php?action=view&view=doc&lang=1&id=355077
# From Paul Eggert (2015-07-01):
# The abovementioned official link to IGO1445-868/2014 states that
# 2014-10-26's fallback transition occurred at 03:00 local time. Also,
# http://www.trm.md/en/social/la-30-martie-vom-trece-la-ora-de-vara
# https://www.trm.md/en/social/la-30-martie-vom-trece-la-ora-de-vara
# says the 2014-03-30 spring-forward transition was at 02:00 local time.
# Guess that since 1997 Moldova has switched one hour before the EU.
@ -1941,7 +1947,7 @@ Zone Europe/Monaco 0:29:32 - LMT 1891 Mar 15
# Amsterdam mean time.
# The data entries before 1945 are taken from
# http://www.staff.science.uu.nl/~gent0113/wettijd/wettijd.htm
# https://www.staff.science.uu.nl/~gent0113/wettijd/wettijd.htm
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Neth 1916 only - May 1 0:00 1:00 NST # Netherlands Summer Time
@ -2022,7 +2028,7 @@ Zone Europe/Oslo 0:43:00 - LMT 1895 Jan 1
# so it must have diverged from Oslo time during the war, as Oslo was
# keeping Berlin time.
#
# <http://home.no.net/janmayen/history.htm> says that the meteorologists
# <https://www.jan-mayen.no/history.htm> says that the meteorologists
# burned down their station in 1940 and left the island, but returned in
# 1941 with a small Norwegian garrison and continued operations despite
# frequent air attacks from Germans. In 1943 the Americans established a
@ -2060,7 +2066,7 @@ Rule Poland 1945 only - Apr 29 0:00 1:00 S
Rule Poland 1945 only - Nov 1 0:00 0 -
# For 1946 on the source is Kazimierz Borkowski,
# Toruń Center for Astronomy, Dept. of Radio Astronomy, Nicolaus Copernicus U.,
# http://www.astro.uni.torun.pl/~kb/Artykuly/U-PA/Czas2.htm#tth_tAb1
# https://www.astro.uni.torun.pl/~kb/Artykuly/U-PA/Czas2.htm#tth_tAb1
# Thanks to Przemysław Augustyniak (2005-05-28) for this reference.
# He also gives these further references:
# Mon Pol nr 13, poz 162 (1995) <http://www.abc.com.pl/serwis/mp/1995/0162.htm>
@ -2094,7 +2100,7 @@ Zone Europe/Warsaw 1:24:00 - LMT 1880
#
# From Paul Eggert (2014-08-11), after a heads-up from Stephen Colebourne:
# According to a Portuguese decree (1911-05-26)
# http://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf
# https://dre.pt/application/dir/pdf1sdip/1911/05/12500/23132313.pdf
# Lisbon was at -0:36:44.68, but switched to GMT on 1912-01-01 at 00:00.
# Round the old offset to -0:36:45. This agrees with Willett but disagrees
# with Shanks, who says the transition occurred on 1911-05-24 at 00:00 for
@ -2276,7 +2282,7 @@ Zone Europe/Bucharest 1:44:24 - LMT 1891 Oct
# 2011 No. 725" and contains no other dates or "effective date" information.
#
# Another source is
# http://www.rg.ru/2011/09/06/chas-zona-dok.html
# https://rg.ru/2011/09/06/chas-zona-dok.html
# which, according to translate.google.com, begins "Resolution of the
# Government of the Russian Federation on August 31, 2011 N 725" and also
# contains "Date first official publication: September 6, 2011 Posted on:
@ -2284,7 +2290,7 @@ Zone Europe/Bucharest 1:44:24 - LMT 1891 Oct
# does not contain any "effective date" information.
#
# Another source is
# http://en.wikipedia.org/wiki/Oymyakonsky_District#cite_note-RuTime-7
# https://en.wikipedia.org/wiki/Oymyakonsky_District#cite_note-RuTime-7
# which, in note 8, contains "Resolution No. 725 of August 31, 2011...
# Effective as of after 7 days following the day of the official publication"
# but which does not contain any reference to September 6, 2011.
@ -2320,7 +2326,7 @@ Zone Europe/Bucharest 1:44:24 - LMT 1891 Oct
# http://itar-tass.com/obschestvo/1333711
# http://www.pravo.gov.ru:8080/page.aspx?111660
# http://www.kremlin.ru/acts/46279
# From October 26, 2014 the new Russian time zone map will looks like this:
# From October 26, 2014 the new Russian time zone map will look like this:
# http://www.worldtimezone.com/dst_news/dst_news_russia-map-2014-07.html
# From Paul Eggert (2006-03-22):
@ -2367,7 +2373,7 @@ Zone Europe/Bucharest 1:44:24 - LMT 1891 Oct
# with maintenance only and represent our best guesses as to which regions
# are covered by each zone. They are not meant to be taken as an authoritative
# listing. The region codes listed come from
# http://en.wikipedia.org/w/?title=Federal_subjects_of_Russia&oldid=611810498
# https://en.wikipedia.org/w/?title=Federal_subjects_of_Russia&oldid=611810498
# and are used for convenience only; no guarantees are made regarding their
# future stability. ISO 3166-2:RU codes are also listed for first-level
# divisions where available.
@ -2532,7 +2538,7 @@ Zone Europe/Kaliningrad 1:22:00 - LMT 1893 Apr
# http://www.kaliningradka.ru/site_pc/cherez/index.php?ELEMENT_ID=40091
# says that Kaliningrad decided not to be an exception 2 days before the
# 1991-03-31 switch and one person at
# http://izhevsk.ru/forum_light_message/50/682597-m8369040.html
# https://izhevsk.ru/forum_light_message/50/682597-m8369040.html
# says he remembers that Samara opted out of the 1992-01-19 exception
# 2 days before the switch.
#
@ -2604,7 +2610,7 @@ Zone Europe/Simferopol 2:16:24 - LMT 1880
3:00 - MSK 1997 Mar lastSun 1:00u
# From Alexander Krivenyshev (2014-03-17):
# time change at 2:00 (2am) on March 30, 2014
# http://vz.ru/news/2014/3/17/677464.html
# https://vz.ru/news/2014/3/17/677464.html
# From Paul Eggert (2014-03-30):
# Simferopol and Sevastopol reportedly changed their central town clocks
# late the previous day, but this appears to have been ceremonial
@ -2787,7 +2793,7 @@ Zone Asia/Omsk 4:53:30 - LMT 1919 Nov 14
# suggests that Altai Republic transitioned to Moscow+3 on
# 1995-05-28.
#
# http://regnum.ru/news/society/1957270.html
# https://regnum.ru/news/society/1957270.html
# has some historical data for Altai Krai:
# before 1957: west part on UTC+6, east on UTC+7
# after 1957: UTC+7
@ -3161,8 +3167,8 @@ Zone Asia/Magadan 10:03:12 - LMT 1924 May 2
# districts, but have very similar populations. In fact, Wikipedia currently
# lists them both as having 3528 people, exactly 1668 males and 1860 females
# each! (Yikes!)
# http://en.wikipedia.org/w/?title=Srednekolymsky_District&oldid=603435276
# http://en.wikipedia.org/w/?title=Verkhnekolymsky_District&oldid=594378493
# https://en.wikipedia.org/w/?title=Srednekolymsky_District&oldid=603435276
# https://en.wikipedia.org/w/?title=Verkhnekolymsky_District&oldid=594378493
# Assume this is a mistake, albeit an amusing one.
#
# Looking at censuses, the populations of the two municipalities seem to have
@ -3483,7 +3489,7 @@ Zone Europe/Stockholm 1:12:12 - LMT 1879 Jan 1
#
# From Alois Treindl (2013-09-11):
# The Federal regulations say
# http://www.admin.ch/opc/de/classified-compilation/20071096/index.html
# https://www.admin.ch/opc/de/classified-compilation/20071096/index.html
# ... the meridian for Bern mean time ... is 7 degrees 26' 22.50".
# Expressed in time, it is 0h29m45.5s.
@ -3560,9 +3566,9 @@ Zone Europe/Zurich 0:34:08 - LMT 1853 Jul 16 # See above comment.
# According to the articles linked below, Turkey will change into summer
# time zone (GMT+3) on March 28, 2011 at 3:00 a.m. instead of March 27.
# This change is due to a nationwide exam on 27th.
# http://www.worldbulletin.net/?aType=haber&ArticleID=70872
# https://www.worldbulletin.net/?aType=haber&ArticleID=70872
# Turkish:
# http://www.hurriyet.com.tr/ekonomi/17230464.asp?gid=373
# https://www.hurriyet.com.tr/yaz-saati-uygulamasi-bir-gun-ileri-alindi-17230464
# From Faruk Pasin (2014-02-14):
# The DST for Turkey has been changed for this year because of the
@ -3698,7 +3704,7 @@ Link Europe/Istanbul Asia/Istanbul # Istanbul is in both continents.
# http://www.segodnya.ua/news/14290482.html
#
# Deputies cancelled the winter time (in Russian)
# http://www.pravda.com.ua/rus/news/2011/09/20/6600616/
# https://www.pravda.com.ua/rus/news/2011/09/20/6600616/
#
# From Philip Pizzey (2011-10-18):
# Today my Ukrainian colleagues have informed me that the

View File

@ -26,19 +26,18 @@
# This file is in the public domain.
# This file is generated automatically from the data in the public-domain
# leap-seconds.list file available from most NIST time servers.
# If the URL <ftp://time.nist.gov/pub/leap-seconds.list> does not work,
# you should be able to pick up leap-seconds.list from a secondary NIST server.
# See <http://tf.nist.gov/tf-cgi/servers.cgi> for a list of secondary servers.
# leap-seconds.list file, which is copied from:
# ftp://ftp.nist.gov/pub/time/leap-seconds.list
# For more about leap-seconds.list, please see
# The NTP Timescale and Leap Seconds
# http://www.eecis.udel.edu/~mills/leap.html
# https://www.eecis.udel.edu/~mills/leap.html
# The International Earth Rotation and Reference Systems Service
# periodically uses leap seconds to keep UTC to within 0.9 s of UT1
# (which measures the true angular orientation of the earth in space); see
# Terry J Quinn, The BIPM and the accurate measure of time,
# Proc IEEE 79, 7 (July 1991), 894-905 <http://dx.doi.org/10.1109/5.84965>.
# Levine J. Coordinated Universal Time and the leap second.
# URSI Radio Sci Bull. 2016;89(4):30-6. doi:10.23919/URSIRSB.2016.7909995
# http://ieeexplore.ieee.org/document/7909995/
# There were no leap seconds before 1972, because the official mechanism
# accounting for the discrepancy between atomic time and the earth's rotation
# did not exist until the early 1970s.
@ -81,5 +80,5 @@ Leap 2012 Jun 30 23:59:60 + S
Leap 2015 Jun 30 23:59:60 + S
Leap 2016 Dec 31 23:59:60 + S
# Updated through IERS Bulletin C53
# File expires on: 28 December 2017
# Updated through IERS Bulletin C54
# File expires on: 28 June 2018

View File

@ -128,10 +128,13 @@
# Last night I heard part of a rebroadcast of a 1945 Arch Oboler radio drama.
# In the introduction, Oboler spoke of "Eastern Peace Time."
# An AltaVista search turned up:
# http://rowayton.org/rhs/hstaug45.html
# https://web.archive.org/web/20000926032210/http://rowayton.org/rhs/hstaug45.html
# "When the time is announced over the radio now, it is 'Eastern Peace
# Time' instead of the old familiar 'Eastern War Time.' Peace is wonderful."
# (August 1945) by way of confirmation.
#
# From Paul Eggert (2017-09-23):
# This was the V-J Day issue of the Clamdigger, a Rowayton, CT newsletter.
# From Joseph Gallant citing
# George H. Douglas, _The Early Days of Radio Broadcasting_ (1987):
@ -280,7 +283,7 @@ Zone PST8PDT -8:00 US P%sT
# HST and HDT are standardized abbreviations for Hawaii-Aleutian
# standard and daylight times. See section 9.47 (p 234) of the
# U.S. Government Printing Office Style Manual (2008)
# http://www.gpo.gov/fdsys/pkg/GPO-STYLEMANUAL-2008/pdf/GPO-STYLEMANUAL-2008.pdf
# https://www.gpo.gov/fdsys/pkg/GPO-STYLEMANUAL-2008/pdf/GPO-STYLEMANUAL-2008.pdf
# From Arthur David Olson, 2005-08-09
# The following was signed into law on 2005-08-08.
@ -369,7 +372,7 @@ Zone America/New_York -4:56:02 - LMT 1883 Nov 18 12:03:58
# western Tennessee, most of Texas, Wisconsin
# From Larry M. Smith (2006-04-26) re Wisconsin:
# http://www.legis.state.wi.us/statutes/Stat0175.pdf ...
# https://docs.legis.wisconsin.gov/statutes/statutes/175.pdf
# is currently enforced at the 01:00 time of change. Because the local
# "bar time" in the state corresponds to 02:00, a number of citations
# are issued for the "sale of class 'B' alcohol after prohibited
@ -378,7 +381,7 @@ Zone America/New_York -4:56:02 - LMT 1883 Nov 18 12:03:58
# From Douglas R. Bomberg (2007-03-12):
# Wisconsin has enacted (nearly eleventh-hour) legislation to get WI
# Statue 175 closer in synch with the US Congress' intent....
# http://www.legis.state.wi.us/2007/data/acts/07Act3.pdf
# https://docs.legis.wisconsin.gov/2007/related/acts/3
# From an email administrator of the City of Fort Pierre, SD (2015-12-21):
# Fort Pierre is technically located in the Mountain time zone as is
@ -425,7 +428,7 @@ Zone America/North_Dakota/New_Salem -6:45:39 - LMT 1883 Nov 18 12:14:21
# ...it appears that Mercer County, North Dakota, changed from the
# mountain time zone to the central time zone at the last transition from
# daylight-saving to standard time (on Nov. 7, 2010):
# http://www.gpo.gov/fdsys/pkg/FR-2010-09-29/html/2010-24376.htm
# https://www.gpo.gov/fdsys/pkg/FR-2010-09-29/html/2010-24376.htm
# http://www.bismarcktribune.com/news/local/article_1eb1b588-c758-11df-b472-001cc4c03286.html
# From Andy Lipscomb (2011-01-24):
@ -476,7 +479,7 @@ Zone America/Denver -6:59:56 - LMT 1883 Nov 18 12:00:04
# legal time, and is not part of the data here.) See:
# Ross SA. An energy crisis from the past: Northern California in 1948.
# Working Paper No. 8, Institute of Governmental Studies, UC Berkeley,
# 1973-11. http://escholarship.org/uc/item/8x22k30c
# 1973-11. https://escholarship.org/uc/item/8x22k30c
#
# In another measure to save electricity, DST was instituted from 1948-03-14
# at 02:01 to 1949-01-16 at 02:00, with the governor having the option to move
@ -497,8 +500,8 @@ Zone America/Denver -6:59:56 - LMT 1883 Nov 18 12:00:04
# which established DST from April's last Sunday at 01:00 until September's
# last Sunday at 02:00. This was amended by 1962's Proposition 6, which changed
# the fall-back date to October's last Sunday. See:
# http://repository.uchastings.edu/cgi/viewcontent.cgi?article=1501&context=ca_ballot_props
# http://repository.uchastings.edu/cgi/viewcontent.cgi?article=1636&context=ca_ballot_props
# https://repository.uchastings.edu/cgi/viewcontent.cgi?article=1501&context=ca_ballot_props
# https://repository.uchastings.edu/cgi/viewcontent.cgi?article=1636&context=ca_ballot_props
#
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER
Rule CA 1948 only - Mar 14 2:01 1:00 D
@ -515,20 +518,31 @@ Zone America/Los_Angeles -7:52:58 - LMT 1883 Nov 18 12:07:02
# Alaska
# AK%sT is the modern abbreviation for -09 per USNO.
#
# From Paul Eggert (2001-05-30):
# From Paul Eggert (2017-06-15):
# Howse writes that Alaska switched from the Julian to the Gregorian calendar,
# and from east-of-GMT to west-of-GMT days, when the US bought it from Russia.
# This was on 1867-10-18, a Friday; the previous day was 1867-10-06 Julian,
# also a Friday. Include only the time zone part of this transition,
# ignoring the switch from Julian to Gregorian, since we can't represent
# the Julian calendar.
# On Friday, 1867-10-18 (Gregorian), at precisely 15:30 local time, the
# Russian forts and fleet at Sitka fired salutes to mark the ceremony of
# formal transfer. See the Sacramento Daily Union (1867-11-14), p 3, col 2.
# https://cdnc.ucr.edu/cgi-bin/cdnc?a=d&d=SDU18671114.2.12.1
# Sitka workers did not change their calendars until Sunday, 1867-10-20,
# and so celebrated two Sundays that week. See: Ahllund T (tr Hallamaa P).
# From the memoirs of a Finnish workman. Alaska History. 2006 Fall;21(2):1-25.
# http://alaskahistoricalsociety.org/wp-content/uploads/2016/12/Ahllund-2006-Memoirs-of-a-Finnish-Workman.pdf
# Include only the time zone part of this transition, ignoring the switch
# from Julian to Gregorian, since we can't represent the Julian calendar.
#
# As far as we know, none of the exact locations mentioned below were
# As far as we know, of the locations mentioned below only Sitka was
# permanently inhabited in 1867 by anyone using either calendar.
# (Yakutat was colonized by the Russians in 1799, but the settlement
# was destroyed in 1805 by a Yakutat-kon war party.) However, there
# were nearby inhabitants in some cases and for our purposes perhaps
# it's best to simply use the official transition.
# (Yakutat was colonized by the Russians in 1799, but the settlement was
# destroyed in 1805 by a Yakutat-kon war party.) Many of Alaska's inhabitants
# were unaware of the US acquisition of Alaska, much less of any calendar or
# time change. However, the Russian-influenced part of Alaska did observe
# Russian time, and it is more accurate to model this than to ignore it.
# The database format requires an exact transition time; use the Russian
# salute as a somewhat-arbitrary time for the formal transfer of control for
# all of Alaska. Sitka's UTC offset is -9:01:13; adjust its 15:30 to the
# local times of other Alaskan locations so that they change simultaneously.
# From Paul Eggert (2014-07-18):
# One opinion of the early-1980s turmoil in Alaska over time zones and
@ -581,10 +595,10 @@ Zone America/Los_Angeles -7:52:58 - LMT 1883 Nov 18 12:07:02
# It seems Metlakatla did go off PST on Sunday, November 1, changing
# their time to AKST and are going to follow Alaska's DST, switching
# between AKST and AKDT from now on....
# http://www.krbd.org/2015/10/30/annette-island-times-they-are-a-changing/
# https://www.krbd.org/2015/10/30/annette-island-times-they-are-a-changing/
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone America/Juneau 15:02:19 - LMT 1867 Oct 18
Zone America/Juneau 15:02:19 - LMT 1867 Oct 19 15:33:32
-8:57:41 - LMT 1900 Aug 20 12:00
-8:00 - PST 1942
-8:00 US P%sT 1946
@ -594,7 +608,7 @@ Zone America/Juneau 15:02:19 - LMT 1867 Oct 18
-8:00 US P%sT 1983 Oct 30 2:00
-9:00 US Y%sT 1983 Nov 30
-9:00 US AK%sT
Zone America/Sitka 14:58:47 - LMT 1867 Oct 18
Zone America/Sitka 14:58:47 - LMT 1867 Oct 19 15:30
-9:01:13 - LMT 1900 Aug 20 12:00
-8:00 - PST 1942
-8:00 US P%sT 1946
@ -602,7 +616,7 @@ Zone America/Sitka 14:58:47 - LMT 1867 Oct 18
-8:00 US P%sT 1983 Oct 30 2:00
-9:00 US Y%sT 1983 Nov 30
-9:00 US AK%sT
Zone America/Metlakatla 15:13:42 - LMT 1867 Oct 18
Zone America/Metlakatla 15:13:42 - LMT 1867 Oct 19 15:44:55
-8:46:18 - LMT 1900 Aug 20 12:00
-8:00 - PST 1942
-8:00 US P%sT 1946
@ -610,14 +624,14 @@ Zone America/Metlakatla 15:13:42 - LMT 1867 Oct 18
-8:00 US P%sT 1983 Oct 30 2:00
-8:00 - PST 2015 Nov 1 2:00
-9:00 US AK%sT
Zone America/Yakutat 14:41:05 - LMT 1867 Oct 18
Zone America/Yakutat 14:41:05 - LMT 1867 Oct 19 15:12:18
-9:18:55 - LMT 1900 Aug 20 12:00
-9:00 - YST 1942
-9:00 US Y%sT 1946
-9:00 - YST 1969
-9:00 US Y%sT 1983 Nov 30
-9:00 US AK%sT
Zone America/Anchorage 14:00:24 - LMT 1867 Oct 18
Zone America/Anchorage 14:00:24 - LMT 1867 Oct 19 14:31:37
-9:59:36 - LMT 1900 Aug 20 12:00
-10:00 - AST 1942
-10:00 US A%sT 1967 Apr
@ -625,7 +639,7 @@ Zone America/Anchorage 14:00:24 - LMT 1867 Oct 18
-10:00 US AH%sT 1983 Oct 30 2:00
-9:00 US Y%sT 1983 Nov 30
-9:00 US AK%sT
Zone America/Nome 12:58:21 - LMT 1867 Oct 18
Zone America/Nome 12:58:22 - LMT 1867 Oct 19 13:29:35
-11:01:38 - LMT 1900 Aug 20 12:00
-11:00 - NST 1942
-11:00 US N%sT 1946
@ -634,7 +648,7 @@ Zone America/Nome 12:58:21 - LMT 1867 Oct 18
-11:00 US B%sT 1983 Oct 30 2:00
-9:00 US Y%sT 1983 Nov 30
-9:00 US AK%sT
Zone America/Adak 12:13:21 - LMT 1867 Oct 18
Zone America/Adak 12:13:22 - LMT 1867 Oct 19 12:44:35
-11:46:38 - LMT 1900 Aug 20 12:00
-11:00 - NST 1942
-11:00 US N%sT 1946
@ -670,7 +684,7 @@ Zone America/Adak 12:13:21 - LMT 1867 Oct 18
# "Hawaiian Time" by Robert C. Schmitt and Doak C. Cox appears on pages 207-225
# of volume 26 of The Hawaiian Journal of History (1992). As of 2010-12-09,
# the article is available at
# http://evols.library.manoa.hawaii.edu/bitstream/10524/239/2/JL26215.pdf
# https://evols.library.manoa.hawaii.edu/bitstream/10524/239/2/JL26215.pdf
# and indicates that standard time was adopted effective noon, January
# 13, 1896 (page 218), that in "1933, the Legislature decreed daylight
# saving for the period between the last Sunday of each April and the
@ -769,7 +783,7 @@ Zone America/Boise -7:44:49 - LMT 1883 Nov 18 12:15:11
# Indiana
#
# For a map of Indiana's time zone regions, see:
# http://en.wikipedia.org/wiki/Time_in_Indiana
# https://en.wikipedia.org/wiki/Time_in_Indiana
#
# From Paul Eggert (2007-08-17):
# Since 1970, most of Indiana has been like America/Indiana/Indianapolis,
@ -996,7 +1010,7 @@ Zone America/Kentucky/Louisville -5:43:02 - LMT 1883 Nov 18 12:16:58
# From Paul Eggert (2001-07-16):
# The final rule was published in the
# Federal Register 65, 160 (2000-08-17), pp 50154-50158.
# http://frwebgate.access.gpo.gov/cgi-bin/getdoc.cgi?dbname=2000_register&docid=fr17au00-22
# https://www.gpo.gov/fdsys/pkg/FR-2000-08-17/html/00-20854.htm
#
Zone America/Kentucky/Monticello -5:39:24 - LMT 1883 Nov 18 12:20:36
-6:00 US C%sT 1946
@ -1022,7 +1036,7 @@ Zone America/Kentucky/Monticello -5:39:24 - LMT 1883 Nov 18 12:20:36
# West Wendover, NV officially switched from Pacific to mountain time on
# 1999-10-31. See the
# Federal Register 64, 203 (1999-10-21), pp 56705-56707.
# http://frwebgate.access.gpo.gov/cgi-bin/getdoc.cgi?dbname=1999_register&docid=fr21oc99-15
# https://www.gpo.gov/fdsys/pkg/FR-1999-10-21/html/99-27240.htm
# However, the Federal Register says that West Wendover already operated
# on mountain time, and the rule merely made this official;
# hence a separate tz entry is not needed.
@ -1052,12 +1066,23 @@ Zone America/Kentucky/Monticello -5:39:24 - LMT 1883 Nov 18 12:20:36
# one hour in 1914." This change is not in Shanks. We have no more
# info, so omit this for now.
#
# From Paul Eggert (2017-07-26):
# Although Shanks says Detroit observed DST in 1967 from 06-14 00:01
# until 10-29 00:01, I now see multiple reports that this is incorrect.
# For example, according to a 50-year anniversary report about the 1967
# Detroit riots and a major-league doubleheader on 1967-07-23, "By the time
# the last fly ball of the doubleheader settled into the glove of leftfielder
# Lenny Green, it was after 7 p.m. Detroit did not observe daylight saving
# time, so light was already starting to fail. Twilight was made even deeper
# by billowing columns of smoke that ascended in an unbroken wall north of the
# ballpark." See: Dow B. Detroit '67: As violence unfolded, Tigers played two
# at home vs. Yankees. Detroit Free Press 2017-07-23.
# https://www.freep.com/story/sports/mlb/tigers/2017/07/23/detroit-tigers-1967-riot-new-york-yankees/499951001/
#
# Most of Michigan observed DST from 1973 on, but was a bit late in 1975.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER
Rule Detroit 1948 only - Apr lastSun 2:00 1:00 D
Rule Detroit 1948 only - Sep lastSun 2:00 0 S
Rule Detroit 1967 only - Jun 14 2:00 1:00 D
Rule Detroit 1967 only - Oct lastSun 2:00 0 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone America/Detroit -5:32:11 - LMT 1905
-6:00 - CST 1915 May 15 2:00
@ -1121,7 +1146,7 @@ Zone America/Menominee -5:50:27 - LMT 1885 Sep 18 12:00
# [PDF] (1914-03)
#
# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94
# <http://www.jstor.org/stable/1774359>.
# <https://www.jstor.org/stable/1774359>.
#
# See the 'europe' file for Greenland.
@ -1167,19 +1192,19 @@ Zone America/Menominee -5:50:27 - LMT 1885 Sep 18 12:00
# The British Columbia government announced yesterday that it will
# adjust daylight savings next year to align with changes in the
# U.S. and the rest of Canada....
# http://www2.news.gov.bc.ca/news_releases_2005-2009/2006AG0014-000330.htm
# https://archive.news.gov.bc.ca/releases/news_releases_2005-2009/2006AG0014-000330.htm
# ...
# Nova Scotia
# Daylight saving time will be extended by four weeks starting in 2007....
# http://www.gov.ns.ca/just/regulations/rg2/2006/ma1206.pdf
# https://www.novascotia.ca/just/regulations/rg2/2006/ma1206.pdf
#
# [For New Brunswick] the new legislation dictates that the time change is to
# be done at 02:00 instead of 00:01.
# http://www.gnb.ca/0062/acts/BBA-2006/Chap-19.pdf
# https://www.gnb.ca/0062/acts/BBA-2006/Chap-19.pdf
# ...
# Manitoba has traditionally changed the clock every fall at 03:00.
# As of 2006, the transition is to take place one hour earlier at 02:00.
# http://web2.gov.mb.ca/laws/statutes/ccsm/o030e.php
# https://web2.gov.mb.ca/laws/statutes/ccsm/o030e.php
# ...
# [Alberta, Ontario, Quebec] will follow US rules.
# http://www.qp.gov.ab.ca/documents/spring/CH03_06.CFM
@ -1193,7 +1218,7 @@ Zone America/Menominee -5:50:27 - LMT 1885 Sep 18 12:00
# http://www.hoa.gov.nl.ca/hoa/bills/Bill0634.htm
# ...
# Yukon
# http://www.gov.yk.ca/legislation/regs/oic2006_127.pdf
# https://www.gov.yk.ca/legislation/regs/oic2006_127.pdf
# ...
# N.W.T. will follow US rules. Whoever maintains the government web site
# does not seem to believe in bookmarks. To see the news release, click the
@ -1214,8 +1239,8 @@ Zone America/Menominee -5:50:27 - LMT 1885 Sep 18 12:00
# time and daylight saving time arrangements in Canada circa 1998.
#
# National Research Council Canada maintains info about time zones and DST.
# http://www.nrc-cnrc.gc.ca/eng/services/time/time_zones.html
# http://www.nrc-cnrc.gc.ca/eng/services/time/faq/index.html#Q5
# https://www.nrc-cnrc.gc.ca/eng/services/time/time_zones.html
# https://www.nrc-cnrc.gc.ca/eng/services/time/faq/index.html#Q5
# Its unofficial information is often taken from Matthews and Vincent.
# From Paul Eggert (2006-06-27):
@ -1252,11 +1277,13 @@ Rule Canada 2007 max - Nov Sun>=1 2:00 0 S
# Newfoundland and Labrador
# From Paul Eggert (2000-10-02):
# Matthews and Vincent (1998) write that Labrador should use NST/NDT,
# but the only part of Labrador that follows the rules is the
# southeast corner, including Port Hope Simpson and Mary's Harbour,
# but excluding, say, Black Tickle.
# From Paul Eggert (2017-10-14):
# Legally Labrador should observe Newfoundland time; see:
# McLeod J. Labrador time - legal or not? St. John's Telegram, 2017-10-07
# http://www.thetelegram.com/news/local/labrador-time--legal-or-not-154860/
# Matthews and Vincent (1998) write that the only part of Labrador
# that follows the rules is the southeast corner, including Port Hope
# Simpson and Mary's Harbour, but excluding, say, Black Tickle.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule StJohns 1917 only - Apr 8 2:00 1:00 D
@ -1456,7 +1483,7 @@ Zone America/Moncton -4:19:08 - LMT 1883 Dec 9
# http://www.justice.gouv.qc.ca/english/publications/generale/temps-minganie-a.htm
# that the coastal strip from just east of Natashquan to Blanc-Sablon
# observes Atlantic standard time all year round.
# http://www.assnat.qc.ca/Media/Process.aspx?MediaId=ANQ.Vigie.Bll.DocumentGenerique_8845en
# https://www.assnat.qc.ca/Media/Process.aspx?MediaId=ANQ.Vigie.Bll.DocumentGenerique_8845en
# says this common practice was codified into law as of 2007.
# For lack of better info, guess this practice began around 1970, contra to
# Shanks & Pottenger who have this region observing AST/ADT.
@ -1488,6 +1515,11 @@ Zone America/Blanc-Sablon -3:48:28 - LMT 1884
# earlier in June).
#
# Kenora, Ontario, was to abandon DST on 1914-06-01 (-05-21).
#
# From Paul Eggert (2017-07-08):
# For more on Orillia, see: Daubs K. Bold attempt at daylight saving
# time became a comic failure in Orillia. Toronto Star 2017-07-08.
# https://www.thestar.com/news/insight/2017/07/08/bold-attempt-at-daylight-saving-time-became-a-comic-failure-in-orillia.html
# From Paul Eggert (1997-10-17):
# Mark Brader writes that an article in the 1997-10-14 Toronto Star
@ -1979,7 +2011,7 @@ Zone America/Creston -7:46:04 - LMT 1884
# * 1967. Paragraph 28(34)(g) of the Interpretation Act, S.C. 1967-68,
# c. 7 defines Yukon standard time as UTC-9....
# see Interpretation Act, R.S.C. 1985, c. I-21, s. 35(1).
# [http://canlii.ca/t/7vhg]
# [https://www.canlii.org/en/ca/laws/stat/rsc-1985-c-i-21/latest/rsc-1985-c-i-21.html]
# * C.O. 1973/214 switched Yukon to PST on 1973-10-28 00:00.
# * O.I.C. 1980/02 established DST.
# * O.I.C. 1987/056 changed DST to Apr firstSun 2:00 to Oct lastSun 2:00.
@ -2044,7 +2076,7 @@ Zone America/Creston -7:46:04 - LMT 1884
# hours behind Greenwich Time.
#
# * Yukon Standard Time defined as Pacific Standard Time, YCO 1973/214
# http://www.canlii.org/en/yk/laws/regu/yco-1973-214/latest/yco-1973-214.html
# https://www.canlii.org/en/yk/laws/regu/yco-1973-214/latest/yco-1973-214.html
# C.O. 1973/214 INTERPRETATION ACT ...
#
# 1. Effective October 28, 1973 Commissioner's Order 1967/59 is hereby
@ -2059,7 +2091,7 @@ Zone America/Creston -7:46:04 - LMT 1884
# http://? - no online source found
#
# * Yukon Daylight Saving Time, YOIC 1987/56
# http://www.canlii.org/en/yk/laws/regu/yoic-1987-56/latest/yoic-1987-56.html
# https://www.canlii.org/en/yk/laws/regu/yoic-1987-56/latest/yoic-1987-56.html
# O.I.C. 1987/056 INTERPRETATION ACT ...
#
# In every year between
@ -2071,7 +2103,7 @@ Zone America/Creston -7:46:04 - LMT 1884
# Dated ... 9th day of March, A.D., 1987.
#
# * Yukon Daylight Saving Time 2006, YOIC 2006/127
# http://www.canlii.org/en/yk/laws/regu/yoic-2006-127/latest/yoic-2006-127.html
# https://www.canlii.org/en/yk/laws/regu/yoic-2006-127/latest/yoic-2006-127.html
# O.I.C. 2006/127 INTERPRETATION ACT ...
#
# 1. In Yukon each year the time for general purposes shall be 7 hours
@ -2085,7 +2117,7 @@ Zone America/Creston -7:46:04 - LMT 1884
# 3. This order comes into force January 1, 2007.
#
# * Interpretation Act, RSY 2002, c 125
# http://www.canlii.org/en/yk/laws/stat/rsy-2002-c-125/latest/rsy-2002-c-125.html
# https://www.canlii.org/en/yk/laws/stat/rsy-2002-c-125/latest/rsy-2002-c-125.html
# From Rives McDow (1999-09-04):
# Nunavut ... moved ... to incorporate the whole territory into one time zone.
@ -2128,7 +2160,7 @@ Zone America/Creston -7:46:04 - LMT 1884
# From Michaela Rodrigue, writing in the
# Nunatsiaq News (1999-11-19):
# http://www.nunatsiaq.com/archives/nunavut991130/nvt91119_17.html
# http://www.nunatsiaqonline.ca/archives/nunavut991130/nvt91119_17.html
# Clyde River, Pangnirtung and Sanikiluaq now operate with two time zones,
# central - or Nunavut time - for government offices, and eastern time
# for municipal offices and schools.... Igloolik [was similar but then]
@ -2146,7 +2178,7 @@ Zone America/Creston -7:46:04 - LMT 1884
# Central Time and Southampton Island [in the Central zone] is not
# required to use daylight savings.
# From <http://www.nunatsiaq.com/archives/nunavut001130/nvt21110_02.html>
# From <http://www.nunatsiaqonline.ca/archives/nunavut001130/nvt21110_02.html>
# Nunavut now has two time zones (2000-11-10):
# The Nunavut government would allow its employees in Kugluktuk and
# Cambridge Bay to operate on central time year-round, putting them
@ -2477,7 +2509,7 @@ Zone America/Dawson -9:17:40 - LMT 1900 Aug 20
# http://gaceta.diputados.gob.mx/Gaceta/61/2009/dic/V2-101209.html
#
# Our page:
# http://www.timeanddate.com/news/time/north-mexico-dst-change.html
# https://www.timeanddate.com/news/time/north-mexico-dst-change.html
# From Arthur David Olson (2010-01-20):
# The page
@ -2896,7 +2928,7 @@ Zone America/Costa_Rica -5:36:13 - LMT 1890 # San José
# http://www.nnc.cubaweb.cu/marzo-2008/cien-1-11-3-08.htm
#
# Some more background information is posted here:
# http://www.timeanddate.com/news/time/cuba-starts-dst-march-16.html
# https://www.timeanddate.com/news/time/cuba-starts-dst-march-16.html
#
# The article also says that Cuba has been observing DST since 1963,
# while Shanks (and tzdata) has 1965 as the first date (except in the
@ -2943,7 +2975,7 @@ Zone America/Costa_Rica -5:36:13 - LMT 1890 # San José
# http://granma.co.cu/2011/03/08/nacional/artic01.html
#
# Our info:
# http://www.timeanddate.com/news/time/cuba-starts-dst-2011.html
# https://www.timeanddate.com/news/time/cuba-starts-dst-2011.html
#
# From Steffen Thorsen (2011-10-30)
# Cuba will end DST two weeks later this year. Instead of going back
@ -2953,7 +2985,7 @@ Zone America/Costa_Rica -5:36:13 - LMT 1890 # San José
# http://www.radioangulo.cu/noticias/cuba/17105-cuba-restablecera-el-horario-del-meridiano-de-greenwich.html
#
# Our page:
# http://www.timeanddate.com/news/time/cuba-time-changes-2011.html
# https://www.timeanddate.com/news/time/cuba-time-changes-2011.html
#
# From Steffen Thorsen (2012-03-01)
# According to Radio Reloj, Cuba will start DST on Midnight between March
@ -2963,7 +2995,7 @@ Zone America/Costa_Rica -5:36:13 - LMT 1890 # San José
# http://www.radioreloj.cu/index.php/noticias-radio-reloj/71-miscelaneas/7529-cuba-aplicara-el-horario-de-verano-desde-el-1-de-abril
#
# Our info on it:
# http://www.timeanddate.com/news/time/cuba-starts-dst-2012.html
# https://www.timeanddate.com/news/time/cuba-starts-dst-2012.html
# From Steffen Thorsen (2012-11-03):
# Radio Reloj and many other sources report that Cuba is changing back
@ -3158,8 +3190,8 @@ Zone America/Guatemala -6:02:04 - LMT 1918 Oct 5
# From Steffen Thorsen (2016-03-12):
# Jean Antoine, editor of www.haiti-reference.com informed us that Haiti
# are not going on DST this year. Several other resources confirm this: ...
# http://www.radiotelevisioncaraibes.com/presse/heure_d_t_pas_de_changement_d_heure_pr_vu_pour_cet_ann_e.html
# http://www.vantbefinfo.com/changement-dheure-pas-pour-haiti/
# https://www.radiotelevisioncaraibes.com/presse/heure_d_t_pas_de_changement_d_heure_pr_vu_pour_cet_ann_e.html
# https://www.vantbefinfo.com/changement-dheure-pas-pour-haiti/
# http://news.anmwe.com/haiti-lheure-nationale-ne-sera-ni-avancee-ni-reculee-cette-annee/
# From Steffen Thorsen (2017-03-12):
@ -3358,7 +3390,7 @@ Zone America/Miquelon -3:44:40 - LMT 1911 May 15 # St Pierre
# Turks and Caicos
#
# From Chris Dunn in
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=415007
# https://bugs.debian.org/415007
# (2007-03-15): In the Turks & Caicos Islands (America/Grand_Turk) the
# daylight saving dates for time changes have been adjusted to match
# the recent U.S. change of dates.
@ -3380,12 +3412,25 @@ Zone America/Miquelon -3:44:40 - LMT 1911 May 15 # St Pierre
# "permanent daylight saving time" by one year....
# http://tcweeklynews.com/time-change-to-go-ahead-this-november-p5437-127.htm
#
# From the Turks & Caicos Cabinet (2017-07-20), heads-up from Steffen Thorsen:
# ... agreed to the reintroduction in TCI of Daylight Saving Time (DST)
# during the summer months and Standard Time, also known as Local
# Time, during the winter months with effect from April 2018 ...
# https://www.gov.uk/government/news/turks-and-caicos-post-cabinet-meeting-statement--3
#
# From Paul Eggert (2017-08-26):
# The date of effect of the spring 2018 change appears to be March 11,
# which makes more sense. See: Hamilton D. Time change back
# by March 2018 for TCI. Magnetic Media. 2017-08-25.
# http://magneticmediatv.com/2017/08/time-change-back-by-march-2018-for-tci/
#
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone America/Grand_Turk -4:44:32 - LMT 1890
-5:07:11 - KMT 1912 Feb # Kingston Mean Time
-5:00 - EST 1979
-5:00 US E%sT 2015 Nov Sun>=1 2:00
-4:00 - AST
-4:00 - AST 2018 Mar 11 3:00
-5:00 US E%sT
# British Virgin Is
# Virgin Is

Some files were not shown because too many files have changed in this diff Show More