Skip to content

Commit c48ac01

Browse files
[GR-65034] Merge in tag jdk-25+23
PullRequest: labsjdk-ce/173
2 parents 0d71b70 + 22cc6fa commit c48ac01

File tree

974 files changed

+17100
-10575
lines changed

Some content is hidden

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

974 files changed

+17100
-10575
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
root = true
22

3+
[*]
4+
charset = utf-8
5+
36
[*.{cpp,hpp,c,h,java,cc,hh,m,mm,S,md,properties,gmk,m4,ac}]
47
trim_trailing_whitespace = true
58

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
* -text
2+
* encoding=utf-8
23
*.java diff=java
34
*.c diff=cpp
45
*.h diff=cpp

doc/building.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,11 @@ <h3 id="special-considerations">Special Considerations</h3>
282282
having slow disk access will significantly increase build times. If you
283283
need to use a network share for the source code, see below for
284284
suggestions on how to keep the build artifacts on a local disk.</p></li>
285+
<li><p>UTF-8 support is needed to compile the JDK. On Unix systems, this
286+
typically means that the <code>C.UTF-8</code> or
287+
<code>en_US.UTF-8</code> locale needs to be available. For Windows
288+
users, please see the section on <a href="#locale-requirements">Locale
289+
Requirements</a> below.</p></li>
285290
<li><p>On Windows, extra care must be taken to have a smooth building
286291
experience:</p>
287292
<ul>

doc/building.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ on where and how to check out the source code.
8383
for the source code, see below for suggestions on how to keep the build
8484
artifacts on a local disk.
8585

86+
* UTF-8 support is needed to compile the JDK. On Unix systems, this typically
87+
means that the `C.UTF-8` or `en_US.UTF-8` locale needs to be available. For
88+
Windows users, please see the section on [Locale
89+
Requirements](#locale-requirements) below.
90+
8691
* On Windows, extra care must be taken to have a smooth building experience:
8792

8893
* Make sure that all relevant paths have short names. Short names are used by

doc/hotspot-style.html

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,12 @@ <h1 class="title">HotSpot Coding Style</h1>
3232
<ul>
3333
<li><a href="#introduction" id="toc-introduction">Introduction</a>
3434
<ul>
35+
<li><a href="#changing-this-document"
36+
id="toc-changing-this-document">Changing this Document</a></li>
3537
<li><a href="#why-care-about-style" id="toc-why-care-about-style">Why
3638
Care About Style?</a></li>
37-
<li><a href="#counterexamples-and-updates"
38-
id="toc-counterexamples-and-updates">Counterexamples and
39-
Updates</a></li>
39+
<li><a href="#counterexamples"
40+
id="toc-counterexamples">Counterexamples</a></li>
4041
</ul></li>
4142
<li><a href="#structure-and-formatting"
4243
id="toc-structure-and-formatting">Structure and Formatting</a>
@@ -99,6 +100,21 @@ <h2 id="introduction">Introduction</h2>
99100
existing HotSpot code, making it easier to read and maintain. Failure to
100101
follow these guidelines may lead to discussion during code reviews, if
101102
not outright rejection of a change.</p>
103+
<h3 id="changing-this-document">Changing this Document</h3>
104+
<p>Proposed changes should be discussed on the <a
105+
href="mailto:[email protected]">HotSpot Developers</a> mailing
106+
list. Changes are likely to be cautious and incremental, since HotSpot
107+
coders have been using these guidelines for years.</p>
108+
<p>Substantive changes are approved by <a
109+
href="https://www.rfc-editor.org/rfc/rfc7282.html">rough consensus</a>
110+
of the <a href="https://openjdk.org/census#hotspot">HotSpot Group</a>
111+
Members. The Group Lead determines whether consensus has been
112+
reached.</p>
113+
<p>Editorial changes (changes that only affect the description of
114+
HotSpot style, not its substance) do not require the full consensus
115+
gathering process. The normal HotSpot pull request process may be used
116+
for editorial changes, with the additional requirement that the
117+
requisite reviewers are also HotSpot Group Members.</p>
102118
<h3 id="why-care-about-style">Why Care About Style?</h3>
103119
<p>Some programmers seem to have lexers and even C preprocessors
104120
installed directly behind their eyeballs. The rest of us require code
@@ -124,7 +140,7 @@ <h3 id="why-care-about-style">Why Care About Style?</h3>
124140
reformatting the whole thing. Also consider separating changes that make
125141
extensive stylistic updates from those which make functional
126142
changes.</p>
127-
<h3 id="counterexamples-and-updates">Counterexamples and Updates</h3>
143+
<h3 id="counterexamples">Counterexamples</h3>
128144
<p>Many of the guidelines mentioned here have (sometimes widespread)
129145
counterexamples in the HotSpot code base. Finding a counterexample is
130146
not sufficient justification for new code to follow the counterexample
@@ -137,20 +153,6 @@ <h3 id="counterexamples-and-updates">Counterexamples and Updates</h3>
137153
of course, is "When in Rome do as the Romans". Sometimes in the suburbs
138154
of Rome the rules are a little different; these differences can be
139155
pointed out here.</p>
140-
<p>Proposed changes should be discussed on the <a
141-
href="mailto:[email protected]">HotSpot Developers</a> mailing
142-
list. Changes are likely to be cautious and incremental, since HotSpot
143-
coders have been using these guidelines for years.</p>
144-
<p>Substantive changes are approved by <a
145-
href="https://www.rfc-editor.org/rfc/rfc7282.html">rough consensus</a>
146-
of the <a href="https://openjdk.org/census#hotspot">HotSpot Group</a>
147-
Members. The Group Lead determines whether consensus has been
148-
reached.</p>
149-
<p>Editorial changes (changes that only affect the description of
150-
HotSpot style, not its substance) do not require the full consensus
151-
gathering process. The normal HotSpot pull request process may be used
152-
for editorial changes, with the additional requirement that the
153-
requisite reviewers are also HotSpot Group Members.</p>
154156
<h2 id="structure-and-formatting">Structure and Formatting</h2>
155157
<h3 id="factoring-and-class-design">Factoring and Class Design</h3>
156158
<ul>

doc/hotspot-style.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,24 @@ HotSpot code, making it easier to read and maintain. Failure to
88
follow these guidelines may lead to discussion during code reviews, if
99
not outright rejection of a change.
1010

11+
### Changing this Document
12+
13+
Proposed changes should be discussed on the
14+
[HotSpot Developers](mailto:[email protected]) mailing
15+
list. Changes are likely to be cautious and incremental, since HotSpot
16+
coders have been using these guidelines for years.
17+
18+
Substantive changes are approved by
19+
[rough consensus](https://www.rfc-editor.org/rfc/rfc7282.html) of
20+
the [HotSpot Group](https://openjdk.org/census#hotspot) Members.
21+
The Group Lead determines whether consensus has been reached.
22+
23+
Editorial changes (changes that only affect the description of HotSpot
24+
style, not its substance) do not require the full consensus gathering
25+
process. The normal HotSpot pull request process may be used for
26+
editorial changes, with the additional requirement that the requisite
27+
reviewers are also HotSpot Group Members.
28+
1129
### Why Care About Style?
1230

1331
Some programmers seem to have lexers and even C preprocessors
@@ -38,7 +56,7 @@ reformatting the whole thing. Also consider separating changes that
3856
make extensive stylistic updates from those which make functional
3957
changes.
4058

41-
### Counterexamples and Updates
59+
### Counterexamples
4260

4361
Many of the guidelines mentioned here have (sometimes widespread)
4462
counterexamples in the HotSpot code base. Finding a counterexample is
@@ -54,22 +72,6 @@ rule, of course, is "When in Rome do as the Romans". Sometimes in the
5472
suburbs of Rome the rules are a little different; these differences
5573
can be pointed out here.
5674

57-
Proposed changes should be discussed on the
58-
[HotSpot Developers](mailto:[email protected]) mailing
59-
list. Changes are likely to be cautious and incremental, since HotSpot
60-
coders have been using these guidelines for years.
61-
62-
Substantive changes are approved by
63-
[rough consensus](https://www.rfc-editor.org/rfc/rfc7282.html) of
64-
the [HotSpot Group](https://openjdk.org/census#hotspot) Members.
65-
The Group Lead determines whether consensus has been reached.
66-
67-
Editorial changes (changes that only affect the description of HotSpot
68-
style, not its substance) do not require the full consensus gathering
69-
process. The normal HotSpot pull request process may be used for
70-
editorial changes, with the additional requirement that the requisite
71-
reviewers are also HotSpot Group Members.
72-
7375
## Structure and Formatting
7476

7577
### Factoring and Class Design

make/CompileInterimLangtools.gmk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,15 @@ define SetupInterimModule
9595
SRC := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim \
9696
$$(wildcard $(SUPPORT_OUTPUTDIR)/gensrc/$1) \
9797
$(TOPDIR)/src/$1/share/classes, \
98-
EXCLUDES := sun javax/tools/snippet-files, \
98+
EXCLUDES := sun, \
9999
EXCLUDE_FILES := $(TOPDIR)/src/$1/share/classes/module-info.java \
100100
$(TOPDIR)/src/$1/share/classes/javax/tools/ToolProvider.java \
101101
$(TOPDIR)/src/$1/share/classes/com/sun/tools/javac/launcher/Main.java \
102102
$(TOPDIR)/src/$1/share/classes/com/sun/tools/javac/launcher/MemoryContext.java \
103103
$(TOPDIR)/src/$1/share/classes/com/sun/tools/javac/launcher/MemoryModuleFinder.java \
104104
$(TOPDIR)/src/$1/share/classes/com/sun/tools/javac/launcher/SourceLauncher.java \
105105
Standard.java, \
106+
EXCLUDE_PATTERNS := -files, \
106107
EXTRA_FILES := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim/module-info.java \
107108
$($1.interim_EXTRA_FILES), \
108109
COPY := .gif .png .xml .css .svg .js .js.template .txt .woff .woff2 javax.tools.JavaCompilerTool, \

make/CompileJavaModules.gmk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ $(eval $(call SetupJavaCompilation, $(MODULE), \
113113
DISABLED_WARNINGS := $(DISABLED_WARNINGS_java), \
114114
EXCLUDES := $(EXCLUDES), \
115115
EXCLUDE_FILES := $(EXCLUDE_FILES), \
116+
EXCLUDE_PATTERNS := -files, \
116117
KEEP_ALL_TRANSLATIONS := $(KEEP_ALL_TRANSLATIONS), \
117118
JAVAC_FLAGS := \
118119
$(DOCLINT) \

make/Docs.gmk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,14 @@ JAVADOC_DISABLED_DOCLINT_PACKAGES := org.w3c.* javax.smartcardio
9696

9797
# The initial set of options for javadoc
9898
JAVADOC_OPTIONS := -use -keywords -notimestamp \
99-
-serialwarn -encoding ISO-8859-1 -docencoding UTF-8 -breakiterator \
99+
-serialwarn -encoding utf-8 -docencoding utf-8 -breakiterator \
100100
-splitIndex --system none -javafx --expand-requires transitive \
101101
--override-methods=summary --syntax-highlight
102102

103103
# The reference options must stay stable to allow for comparisons across the
104104
# development cycle.
105105
REFERENCE_OPTIONS := -XDignore.symbol.file=true -use -keywords -notimestamp \
106-
-serialwarn -encoding ISO-8859-1 -breakiterator -splitIndex --system none \
106+
-serialwarn -encoding utf-8 -breakiterator -splitIndex --system none \
107107
-html5 -javafx --expand-requires transitive
108108

109109
# Should we add DRAFT stamps to the generated javadoc?
@@ -262,7 +262,7 @@ define create_overview_file
262262
$$($1_OVERVIEW): $$($1_OVERVIEW_VARDEPS_FILE)
263263
$$(call LogInfo, Creating overview.html for $1)
264264
$$(call MakeDir, $$(@D))
265-
$$(ECHO) -n '$$($1_OVERVIEW_TEXT)' > $$@
265+
$$(PRINTF) "%s" '$$($1_OVERVIEW_TEXT)' > $$@
266266
endef
267267

268268
################################################################################

make/GenerateLinkOptData.gmk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,20 @@ $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST
7676
$(call LogInfo, Generating $(patsubst $(OUTPUTDIR)/%, %, $(JLI_TRACE_FILE)))
7777
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:[email protected] \
7878
$(CLASSLIST_FILE_VM_OPTS) \
79+
-Xlog:cds=off \
7980
-cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
8081
build.tools.classlist.HelloClasslist $(LOG_DEBUG)
8182
$(GREP) -v HelloClasslist [email protected] > [email protected]
8283
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -Xshare:dump \
84+
-Xlog:cds=off \
8385
8486
-Xmx128M -Xms128M $(LOG_INFO)
8587
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:[email protected] \
8688
8789
-Djava.lang.invoke.MethodHandle.TRACE_RESOLVE=true \
8890
$(CLASSLIST_FILE_VM_OPTS) \
8991
--module-path $(SUPPORT_OUTPUTDIR)/classlist.jar \
92+
-Xlog:cds=off \
9093
-cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
9194
build.tools.classlist.HelloClasslist \
9295
2> $(LINK_OPT_DIR)/stderr > $(JLI_TRACE_FILE) \
@@ -100,6 +103,7 @@ $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST
100103
$(GREP) -v HelloClasslist [email protected] > [email protected]
101104
102105
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java \
106+
-Xlog:cds=off \
103107
-cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
104108
build.tools.classlist.SortClasslist [email protected] > $@
105109

0 commit comments

Comments
 (0)