Skip to content

Commit

Permalink
Merge jdk
Browse files Browse the repository at this point in the history
Merge jdk-22+15
  • Loading branch information
David Simms committed Nov 17, 2023
2 parents 24e0c05 + ce93d27 commit 6e6ac6c
Show file tree
Hide file tree
Showing 1,385 changed files with 15,811 additions and 12,081 deletions.
2 changes: 1 addition & 1 deletion .github/actions/get-gtest/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ runs:
var: GTEST_VERSION

- name: 'Checkout GTest source'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: google/googletest
ref: 'v${{ steps.version.outputs.value }}'
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/get-jtreg/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ runs:
key: jtreg-${{ steps.version.outputs.value }}

- name: 'Checkout the JTReg source'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: openjdk/jtreg
ref: jtreg-${{ steps.version.outputs.value }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-cross-compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:

steps:
- name: 'Checkout the JDK source'
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 'Get the BootJDK'
id: bootjdk
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:

steps:
- name: 'Checkout the JDK source'
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 'Get the BootJDK'
id: bootjdk
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:

steps:
- name: 'Checkout the JDK source'
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 'Get the BootJDK'
id: bootjdk
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:

steps:
- name: 'Checkout the JDK source'
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 'Get MSYS2'
uses: ./.github/actions/get-msys2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:

steps:
- name: 'Checkout the JDK source'
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 'Get MSYS2'
uses: ./.github/actions/get-msys2
Expand Down
6 changes: 4 additions & 2 deletions make/autoconf/flags-cflags.m4
Original file line number Diff line number Diff line change
Expand Up @@ -560,8 +560,10 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
TOOLCHAIN_CFLAGS_JVM="-qtbtable=full -qtune=balanced -fno-exceptions \
-qalias=noansi -qstrict -qtls=default -qnortti -qnoeh -qignerrno -qstackprotect"
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
TOOLCHAIN_CFLAGS_JVM="-nologo -MD -Zc:preprocessor -Zc:strictStrings -Zc:inline -MP"
TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:preprocessor -Zc:strictStrings -Zc:inline -Zc:wchar_t-"
# The -utf-8 option sets source and execution character sets to UTF-8 to enable correct
# compilation of all source files regardless of the active code page on Windows.
TOOLCHAIN_CFLAGS_JVM="-nologo -MD -Zc:preprocessor -Zc:strictStrings -Zc:inline -utf-8 -MP"
TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:preprocessor -Zc:strictStrings -Zc:inline -utf-8 -Zc:wchar_t-"
fi
# CFLAGS C language level for JDK sources (hotspot only uses C++)
Expand Down
11 changes: 10 additions & 1 deletion make/common/TestFilesCompilation.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,15 @@ define SetupTestFilesCompilationBody

$1_BUILD_INFO := $$($1_OUTPUT_DIR)/_$1-build-info.marker

# Tests are built with internal debug symbols where supported.
# With Visual Studio or on macosx, we revert to external.
$1_COPY_DEBUG_SYMBOLS := false
ifeq ($(TOOLCHAIN_TYPE), microsoft)
$1_COPY_DEBUG_SYMBOLS := true
else ifeq ($(call isTargetOs, macosx), true)
$1_COPY_DEBUG_SYMBOLS := true
endif

# Setup a compilation for each and every one of them
$$(foreach file, $$($1_FILTERED_FILE_LIST),\
$$(eval name := $$(strip $$(basename $$(notdir $$(file))))) \
Expand All @@ -106,7 +115,7 @@ define SetupTestFilesCompilationBody
LIBS := $$($1_LIBS_$$(name)), \
TOOLCHAIN := $(if $$(filter %.cpp, $$(file)), TOOLCHAIN_LINK_CXX, TOOLCHAIN_DEFAULT), \
OPTIMIZATION := $$(if $$($1_OPTIMIZATION_$$(name)),$$($1_OPTIMIZATION_$$(name)),LOW), \
COPY_DEBUG_SYMBOLS := $$(if $$($1_COPY_DEBUG_SYMBOLS_$$(name)),$$($1_COPY_DEBUG_SYMBOLS_$$(name)),false), \
COPY_DEBUG_SYMBOLS := $$($1_COPY_DEBUG_SYMBOLS), \
STRIP_SYMBOLS := $$(if $$($1_STRIP_SYMBOLS_$$(name)),$$($1_STRIP_SYMBOLS_$$(name)),false), \
BUILD_INFO_LOG_MACRO := LogInfo, \
)) \
Expand Down
1 change: 1 addition & 0 deletions make/data/hotspot-symbols/symbols-unix
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ JVM_DumpAllStacks
JVM_DumpClassListToFile
JVM_DumpDynamicArchive
JVM_DumpThreads
JVM_ExpandStackFrameInfo
JVM_FillInStackTrace
JVM_FindClassFromCaller
JVM_FindClassFromClass
Expand Down
8 changes: 7 additions & 1 deletion make/jdk/src/classes/build/tools/cldrconverter/Bundle.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2023, 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
Expand Down Expand Up @@ -108,6 +108,12 @@ static enum Type {
"narrow.Eras"
};

static final String[] LIST_PATTERN_KEYS = {
"ListPatterns_standard",
"ListPatterns_or",
"ListPatterns_unit",
};

// DateFormatItem prefix
static final String DATEFORMATITEM_KEY_PREFIX = "DateFormatItem.";
static final String DATEFORMATITEM_INPUT_REGIONS_PREFIX = "DateFormatItemInputRegions.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,14 @@ private static void convertBundles(List<Bundle> bundles) throws Exception {
*/
static void handleAliases(Map<String, Object> bundleMap) {
for (String key : aliases.keySet()) {
var source = bundleMap.get(aliases.get(key));
var sourceKey = aliases.get(key);
if (key.startsWith("ListPatterns_")) {
String k;
while ((k = aliases.get(sourceKey)) != null) {
sourceKey = k;
}
}
var source = bundleMap.get(sourceKey);
if (source != null) {
if (bundleMap.get(key) instanceof String[] sa) {
// fill missing elements in case of String array
Expand Down Expand Up @@ -871,6 +878,7 @@ private static Map<String, Object> extractCalendarData(Map<String, Object> map,
"DayPeriodRules",
"DateFormatItemInputRegions.allowed",
"DateFormatItemInputRegions.preferred",
"ListPatterns",
};

static final Set<String> availableSkeletons = new HashSet<>();
Expand Down Expand Up @@ -935,6 +943,14 @@ private static Map<String, Object> extractFormatData(Map<String, Object> map, St
formatData.put(k + ".NumberElements", neNew);
});
}

// ListPatterns
for (var lpKey : Bundle.LIST_PATTERN_KEYS) {
copyIfPresent(map, lpKey, formatData);
copyIfPresent(map, lpKey + "-short", formatData);
copyIfPresent(map, lpKey + "-narrow", formatData);
}

return formatData;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2023, 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
Expand Down Expand Up @@ -35,6 +35,7 @@
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import org.xml.sax.Attributes;
import org.xml.sax.InputSource;
Expand Down Expand Up @@ -812,6 +813,7 @@ public void startElement(String uri, String localName, String qName, Attributes
&& ((currentContainer.getqName().equals("decimalFormatLength"))
|| (currentContainer.getqName().equals("currencyFormat"))
|| (currentContainer.getqName().equals("percentFormat"))
|| (currentContainer.getqName().equals("listPattern"))
|| (currentCalendarType != null && !currentCalendarType.lname().startsWith("islamic-")))) { // ignore islamic variants
pushAliasEntry(qName, attributes, attributes.getValue("path"));
} else {
Expand All @@ -820,6 +822,28 @@ public void startElement(String uri, String localName, String qName, Attributes
}
break;

// ListPatterns
case "listPattern":
currentStyle = Optional.ofNullable(attributes.getValue("type")).orElse("standard");
pushStringArrayEntry(qName, attributes, "ListPatterns_" + currentStyle, 5);
break;
case "listPatternPart":
type = attributes.getValue("type");
pushStringArrayElement(qName, attributes,
switch (type) {
case "start" -> 0;
case "middle" -> 1;
case "end" -> 2;
case "2" -> 3;
case "3" -> 4;
default -> throw new IllegalArgumentException(
"""
The "type" attribute value for "listPatternPart" element is not recognized: %s
""".formatted(type)
);
});
break;

default:
// treat anything else as a container
pushContainer(qName, attributes);
Expand Down Expand Up @@ -973,6 +997,9 @@ private String toJDKKey(String containerqName, String context, String type) {
"NumberPatterns/" +
(type.equals("standard") ? containerqName.replaceFirst("Format", "") : type);
break;
case "listPattern":
keyName = type;
break;
default:
keyName = "";
break;
Expand Down Expand Up @@ -1035,6 +1062,19 @@ private String getTarget(String path, String calType, String context, String wid
return toJDKKey(qName, "", style);
}

// listPattern
if (path.indexOf("../listPattern") != -1) {
typeKey = "[@type='";
start = path.indexOf(typeKey);
String style;
if (start != -1) {
style = "ListPatterns_" + path.substring(start + typeKey.length(), path.indexOf("']", start));
} else {
style = "ListPatterns_standard";
}
return toJDKKey(qName, "", style);
}

return calType + "." + toJDKKey(qName, context, width);
}

Expand Down Expand Up @@ -1107,6 +1147,10 @@ public void endElement(String uri, String localName, String qName) throws SAXExc
case "timeFormatLength":
currentStyle = "";
break;
case "listPattern":
currentStyle = "";
putIfEntry();
break;
default:
putIfEntry();
}
Expand All @@ -1128,6 +1172,12 @@ private Object putIfEntry() {
toJDKKey(containerqName, "", kc.getKey()),
getTarget(entry.getKey(), "", "", "")
);
} else if (containerqName.equals("listPattern")) {
var sae = (StringArrayEntry)entry.getParent();
CLDRConverter.aliases.put(
toJDKKey(containerqName, "", sae.getKey()),
getTarget(entry.getKey(), "", "", "")
);
} else {
Set<String> keyNames = populateAliasKeys(containerqName, currentContext, currentWidth);
if (!keyNames.isEmpty()) {
Expand Down
1 change: 0 additions & 1 deletion make/test/JtregNativeHotspot.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,6 @@ ifeq ($(call isTargetOs, windows), true)
BUILD_HOTSPOT_JTREG_EXCLUDE += exesigtest.c libterminatedThread.c libTestJNI.c libCompleteExit.c libTestPsig.c exeGetCreatedJavaVMs.c
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libatExit := jvm.lib
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libnativeStack := jvm.lib
BUILD_HOTSPOT_JTREG_LIBRARIES_COPY_DEBUG_SYMBOLS_libnativeStack := true
BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exedaemonDestroy := jvm.lib
else
BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exedaemonDestroy := -ljvm
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/aarch64/assembler_aarch64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ class Address {
if (size == 0) // It's a byte
i->f(ext().shift() >= 0, 12);
else {
assert(ext().shift() <= 0 || ext().shift() == (int)size, "bad shift");
guarantee(ext().shift() <= 0 || ext().shift() == (int)size, "bad shift");
i->f(ext().shift() > 0, 12);
}
i->f(0b10, 11, 10);
Expand Down
Loading

0 comments on commit 6e6ac6c

Please sign in to comment.