Skip to content
Permalink
Browse files
Merge jdk
Merge tag 'jdk-16+25'
  • Loading branch information
David Simms committed Nov 20, 2020
2 parents 39c775f + 655bb61 commit 0e48aeb496257b66afa21cf1067206b7fcf6de6f
Showing 464 changed files with 14,929 additions and 7,806 deletions.
@@ -111,6 +111,7 @@ jobs:
- build debug
- build hotspot no-pch
- build hotspot minimal
- build hotspot optimized
include:
- flavor: build debug
flags: --enable-debug
@@ -121,6 +122,9 @@ jobs:
- flavor: build hotspot minimal
flags: --enable-debug --disable-precompiled-headers --with-jvm-variants=minimal
build-target: hotspot
- flavor: build hotspot optimized
flags: --with-debug-level=optimized --disable-precompiled-headers
build-target: hotspot

env:
JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).DEFAULT_VERSION_FEATURE }}"
@@ -385,7 +389,7 @@ jobs:

windows_x64_build:
name: Windows x64
runs-on: "windows-latest"
runs-on: "windows-2019"
needs: prerequisites
if: needs.prerequisites.outputs.should_run != 'false' && needs.prerequisites.outputs.platform_windows_x64 != 'false'

@@ -465,12 +469,19 @@ jobs:
path: ~/jtreg/
if: steps.jtreg_restore.outcome == 'failure'

- name: Ensure a specific version of MSVC is installed
run: >
Start-Process -FilePath 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe' -Wait -NoNewWindow -ArgumentList
'modify --installPath "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise" --quiet
--add Microsoft.VisualStudio.Component.VC.14.27.x86.x64'
- name: Configure
run: >
$env:Path = "$HOME\cygwin\cygwin64\bin;$HOME\cygwin\cygwin64\bin;$env:Path" ;
$env:Path = $env:Path -split ";" -match "C:\\Windows|PowerShell|cygwin" -join ";" ;
& bash configure
--with-conf-name=windows-x64
--with-msvc-toolset-version=14.27
${{ matrix.flags }}
--with-version-opt="$env:GITHUB_ACTOR-$env:GITHUB_SHA"
--with-version-build=0
@@ -501,7 +512,7 @@ jobs:

windows_x64_test:
name: Windows x64
runs-on: "windows-latest"
runs-on: "windows-2019"
needs:
- prerequisites
- windows_x64_build
@@ -702,7 +713,7 @@ jobs:

macos_x64_build:
name: macOS x64
runs-on: "macos-latest"
runs-on: "macos-10.15"
needs: prerequisites
if: needs.prerequisites.outputs.should_run != 'false' && needs.prerequisites.outputs.platform_macos_x64 != 'false'

@@ -772,6 +783,9 @@ jobs:
- name: Install dependencies
run: brew install make

- name: Select Xcode version
run: sudo xcode-select --switch /Applications/Xcode_11.3.1.app/Contents/Developer

- name: Configure
run: >
bash configure
@@ -802,7 +816,7 @@ jobs:

macos_x64_test:
name: macOS x64
runs-on: "macos-latest"
runs-on: "macos-10.15"
needs:
- prerequisites
- macos_x64_build
@@ -915,6 +929,9 @@ jobs:
- name: Install dependencies
run: brew install make

- name: Select Xcode version
run: sudo xcode-select --switch /Applications/Xcode_11.3.1.app/Contents/Developer

- name: Find root of jdk image dir
run: |
imageroot=`find ${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_osx-x64_bin${{ matrix.artifact }} -name release -type f`
@@ -49,6 +49,7 @@ <h1 class="title">HotSpot Coding Style</h1>
<li><a href="#thread_local">thread_local</a></li>
<li><a href="#nullptr">nullptr</a></li>
<li><a href="#atomic">&lt;atomic&gt;</a></li>
<li><a href="#uniform-initialization">Uniform Initialization</a></li>
<li><a href="#additional-permitted-features">Additional Permitted Features</a></li>
<li><a href="#excluded-features">Excluded Features</a></li>
<li><a href="#undecided-features">Undecided Features</a></li>
@@ -275,6 +276,17 @@ <h3 id="atomic">&lt;atomic&gt;</h3>
<p>Do not use facilities provided by the <code>&lt;atomic&gt;</code> header (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2427.html">n2427</a>), (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2752.htm">n2752</a>); instead, use the HotSpot <code>Atomic</code> class and related facilities.</p>
<p>Atomic operations in HotSpot code must have semantics which are consistent with those provided by the JDK's compilers for Java. There are platform-specific implementation choices that a C++ compiler might make or change that are outside the scope of the C++ Standard, and might differ from what the Java compilers implement.</p>
<p>In addition, HotSpot <code>Atomic</code> has a concept of &quot;conservative&quot; memory ordering, which may differ from (may be stronger than) sequentially consistent. There are algorithms in HotSpot that are believed to rely on that ordering.</p>
<h3 id="uniform-initialization">Uniform Initialization</h3>
<p>The use of <em>uniform initialization</em> (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2672.htm">n2672</a>), also known as <em>brace initialization</em>, is permitted.</p>
<p>Some relevant sections from cppreference.com:</p>
<ul>
<li><a href="https://en.cppreference.com/w/cpp/language/initialization">initialization</a></li>
<li><a href="https://en.cppreference.com/w/cpp/language/value_initialization">value initialization</a></li>
<li><a href="https://en.cppreference.com/w/cpp/language/direct_initialization">direct initialization</a></li>
<li><a href="https://en.cppreference.com/w/cpp/language/list_initialization">list initialization</a></li>
<li><a href="https://en.cppreference.com/w/cpp/language/aggregate_initialization">aggregate initialization</a></li>
</ul>
<p>Although related, the use of <code>std::initializer_list</code> remains forbidden, as part of the avoidance of the C++ Standard Library in HotSpot code.</p>
<h3 id="additional-permitted-features">Additional Permitted Features</h3>
<ul>
<li><p><code>constexpr</code> (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf">n2235</a>) (<a href="https://isocpp.org/files/papers/N3652.html">n3652</a>)</p></li>
@@ -681,6 +681,23 @@ ordering, which may differ from (may be stronger than) sequentially
consistent. There are algorithms in HotSpot that are believed to rely
on that ordering.

### Uniform Initialization

The use of _uniform initialization_
([n2672](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2672.htm)),
also known as _brace initialization_, is permitted.

Some relevant sections from cppreference.com:

* [initialization](https://en.cppreference.com/w/cpp/language/initialization)
* [value initialization](https://en.cppreference.com/w/cpp/language/value_initialization)
* [direct initialization](https://en.cppreference.com/w/cpp/language/direct_initialization)
* [list initialization](https://en.cppreference.com/w/cpp/language/list_initialization)
* [aggregate initialization](https://en.cppreference.com/w/cpp/language/aggregate_initialization)

Although related, the use of `std::initializer_list` remains forbidden, as
part of the avoidance of the C++ Standard Library in HotSpot code.

### Additional Permitted Features

* `constexpr`
@@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2012, 2020, 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
@@ -49,7 +49,7 @@ export LC_ALL=C
if test "x$CUSTOM_CONFIG_DIR" != x; then
custom_hook=$CUSTOM_CONFIG_DIR/custom-hook.m4
if test ! -e $custom_hook; then
echo "CUSTOM_CONFIG_DIR not pointing to a proper custom config dir."
echo "CUSTOM_CONFIG_DIR ($CUSTOM_CONFIG_DIR) not pointing to a proper custom config dir."
echo "Error: Cannot continue" 1>&2
exit 1
fi
@@ -83,6 +83,7 @@ autoconf_missing_help() {
BREW="`type -p brew 2> /dev/null`"
ZYPPER="`type -p zypper 2> /dev/null`"
CYGWIN="`type -p cygpath 2> /dev/null`"
UNAMEOUT="`uname 2> /dev/null`"

if test "x$ZYPPER" != x; then
PKGHANDLER_COMMAND="sudo zypper install autoconf"
@@ -92,6 +93,8 @@ autoconf_missing_help() {
PKGHANDLER_COMMAND="sudo yum install autoconf"
elif test "x$BREW" != x; then
PKGHANDLER_COMMAND="brew install autoconf"
elif test "x$UNAMEOUT" == xAIX; then
echo "You might be able to fix this by installing autoconf from the 'AIX Toolbox for Linux Applications' (or compile it from the sources)."
elif test "x$CYGWIN" != x; then
PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P autoconf )"
fi
@@ -114,7 +117,7 @@ generate_configure_script() {
AUTOCONF="`type -p autoconf 2> /dev/null`"
if test "x$AUTOCONF" = x; then
echo
echo "Autoconf is not found on the PATH, and AUTOCONF is not set."
echo "Autoconf is not found on the PATH ($PATH), and AUTOCONF is not set."
echo "You need autoconf to be able to generate a runnable configure script."
autoconf_missing_help
echo "Error: Cannot find autoconf" 1>&2
@@ -256,6 +256,13 @@ var getJibProfilesCommon = function (input, data) {
"--disable-jvm-feature-shenandoahgc",
versionArgs(input, common))
};
// Extra settings for release profiles
common.release_profile_base = {
configure_args: [
"--enable-reproducible-build",
"--with-source-date=current",
],
};
// Extra settings for debug profiles
common.debug_suffix = "-debug";
common.debug_profile_base = {
@@ -268,6 +275,12 @@ var getJibProfilesCommon = function (input, data) {
configure_args: ["--with-debug-level=slowdebug"],
labels: "slowdebug"
};
// Extra settings for optimized profiles
common.optimized_suffix = "-optimized";
common.optimized_profile_base = {
configure_args: ["--with-debug-level=optimized"],
labels: "optimized",
};
// Extra settings for openjdk only profiles
common.open_suffix = "-open";
common.open_profile_base = {
@@ -510,6 +523,13 @@ var getJibProfilesProfiles = function (input, common, data) {
profiles[debugName] = concatObjects(profiles[name],
common.slowdebug_profile_base);
});
// Generate optimized versions of all the main profiles
common.main_profile_names.forEach(function (name) {
var optName = name + common.optimized_suffix;
profiles[optName] = concatObjects(profiles[name],
common.optimized_profile_base);
profiles[optName].default_make_targets = [ "hotspot" ];
});
// Generate testmake profiles for the main profile of each build host
// platform. This profile only runs the makefile tests.
// Ant is needed to run the idea project generator test.
@@ -797,6 +817,13 @@ var getJibProfilesProfiles = function (input, common, data) {
});
});

// After creating all derived profiles, we can add the release profile base
// to the main profiles
common.main_profile_names.forEach(function (name) {
profiles[name] = concatObjects(profiles[name],
common.release_profile_base);
});

// Artifacts of JCov profiles
[ "linux-aarch64", "linux-x64", "macosx-x64", "windows-x64" ]
.forEach(function (name) {
@@ -375,6 +375,16 @@ String getCurrencies() {
}
}

// rules
String rule = CLDRConverter.pluralRules.get(id);
if (rule != null) {
myMap.put("PluralRules", rule);
}
rule = CLDRConverter.dayPeriodRules.get(id);
if (rule != null) {
myMap.put("DayPeriodRules", rule);
}

// Remove all duplicates
if (Objects.nonNull(parentsMap)) {
for (Iterator<String> it = myMap.keySet().iterator(); it.hasNext();) {
@@ -522,8 +532,6 @@ private void handleDateTimeFormatPatterns(String[] patternKeys, Map<String, Obje
if (pattern != null) {
// Perform date-time format pattern conversion which is
// applicable to both SimpleDateFormat and j.t.f.DateTimeFormatter.
// For example, character 'B' is mapped with 'a', as 'B' is not
// supported in either SimpleDateFormat or j.t.f.DateTimeFormatter
String transPattern = translateDateFormatLetters(calendarType, pattern, this::convertDateTimePatternLetter);
dateTimePatterns.add(i, transPattern);
// Additionally, perform SDF specific date-time format pattern conversion
@@ -653,17 +661,6 @@ private void convertDateTimePatternLetter(CalendarType calendarType, char cldrLe
// as the best approximation
appendN('y', count, sb);
break;
case 'B':
// 'B' character (day period) is not supported by
// SimpleDateFormat and j.t.f.DateTimeFormatter,
// this is a workaround in which 'B' character
// appearing in CLDR date-time pattern is replaced
// with 'a' character and hence resolved with am/pm strings.
// This workaround is based on the the fallback mechanism
// specified in LDML spec for 'B' character, when a locale
// does not have data for day period ('B')
appendN('a', count, sb);
break;
default:
appendN(cldrLetter, count, sb);
break;
@@ -720,6 +717,17 @@ private void convertSDFLetter(CalendarType calendarType, char cldrLetter, int co
}
break;

case 'B':
// 'B' character (day period) is not supported by SimpleDateFormat,
// this is a workaround in which 'B' character
// appearing in CLDR date-time pattern is replaced
// with 'a' character and hence resolved with am/pm strings.
// This workaround is based on the the fallback mechanism
// specified in LDML spec for 'B' character, when a locale
// does not have data for day period ('B')
appendN('a', count, sb);
break;

default:
appendN(cldrLetter, count, sb);
break;

0 comments on commit 0e48aeb

Please sign in to comment.