Skip to content

Commit 4658209

Browse files
author
William Kemper
committedOct 4, 2024
Merge
2 parents cbc0fd0 + 19642bd commit 4658209

File tree

447 files changed

+22796
-4175
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

447 files changed

+22796
-4175
lines changed
 

‎make/hotspot/gensrc/GensrcAdlc.gmk

+7
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,13 @@ ifeq ($(call check-jvm-feature, compiler2), true)
200200
)))
201201
endif
202202

203+
ifeq ($(call check-jvm-feature, g1gc), true)
204+
AD_SRC_FILES += $(call uniq, $(wildcard $(foreach d, $(AD_SRC_ROOTS), \
205+
$d/cpu/$(HOTSPOT_TARGET_CPU_ARCH)/gc/g1/g1_$(HOTSPOT_TARGET_CPU).ad \
206+
$d/cpu/$(HOTSPOT_TARGET_CPU_ARCH)/gc/g1/g1_$(HOTSPOT_TARGET_CPU_ARCH).ad \
207+
)))
208+
endif
209+
203210
SINGLE_AD_SRCFILE := $(ADLC_SUPPORT_DIR)/all-ad-src.ad
204211

205212
INSERT_FILENAME_AWK_SCRIPT := \

‎make/jdk/src/classes/build/tools/tzdb/TzdbZoneRulesCompiler.java

+12-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -273,16 +273,16 @@ private void outputFile(Path dstFile, String version,
273273
// link version-region-rules
274274
out.writeShort(builtZones.size());
275275
for (Map.Entry<String, ZoneRules> entry : builtZones.entrySet()) {
276-
int regionIndex = Arrays.binarySearch(regionArray, entry.getKey());
276+
int regionIndex = findRegionIndex(regionArray, entry.getKey());
277277
int rulesIndex = rulesList.indexOf(entry.getValue());
278278
out.writeShort(regionIndex);
279279
out.writeShort(rulesIndex);
280280
}
281281
// alias-region
282282
out.writeShort(links.size());
283283
for (Map.Entry<String, String> entry : links.entrySet()) {
284-
int aliasIndex = Arrays.binarySearch(regionArray, entry.getKey());
285-
int regionIndex = Arrays.binarySearch(regionArray, entry.getValue());
284+
int aliasIndex = findRegionIndex(regionArray, entry.getKey());
285+
int regionIndex = findRegionIndex(regionArray, entry.getValue());
286286
out.writeShort(aliasIndex);
287287
out.writeShort(regionIndex);
288288
}
@@ -294,6 +294,14 @@ private void outputFile(Path dstFile, String version,
294294
}
295295
}
296296

297+
private static int findRegionIndex(String[] regionArray, String region) {
298+
int index = Arrays.binarySearch(regionArray, region);
299+
if (index < 0) {
300+
throw new IllegalArgumentException("Unknown region: " + region);
301+
}
302+
return index;
303+
}
304+
297305
/** Whether to output verbose messages. */
298306
private boolean verbose;
299307

0 commit comments

Comments
 (0)