Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Automatic merge of client:master into master
  • Loading branch information
duke committed Aug 21, 2020
2 parents 8a4cf7f + 57e72cf commit 63a43563250917068a1432f087fd391fb8cc2044
Show file tree
Hide file tree
Showing 231 changed files with 4,012 additions and 2,508 deletions.
@@ -657,4 +657,6 @@ b0817631d2f4395508cb10e81c3858a94d9ae4de jdk-15+34
fd60c3146a024037cdd9be34c645bb793995a7cc jdk-15+35
c075a286cc7df767cce28e8057d6ec5051786490 jdk-16+9
b01985b4f88f554f97901e53e1ba314681dd9c19 jdk-16+10
e3f940bd3c8fcdf4ca704c6eb1ac745d155859d5 jdk-15+36
5c18d696c7ce724ca36df13933aa53f50e12b9e0 jdk-16+11
fc8e62b399bd93d06e8d13dc3b384c450e853dcd jdk-16+12
@@ -28,7 +28,8 @@ <h1 class="title">HotSpot Coding Style</h1>
</ul></li>
<li><a href="#structure-and-formatting">Structure and Formatting</a><ul>
<li><a href="#factoring-and-class-design">Factoring and Class Design</a></li>
<li><a href="#files">Files</a></li>
<li><a href="#source-files">Source Files</a></li>
<li><a href="#jtreg-tests">JTReg Tests</a></li>
<li><a href="#naming">Naming</a></li>
<li><a href="#commenting">Commenting</a></li>
<li><a href="#macros">Macros</a></li>
@@ -87,7 +88,7 @@ <h3 id="factoring-and-class-design">Factoring and Class Design</h3>
<li><p>Don't use the Copy and Paste keys to replicate more than a couple lines of code. Name what you must repeat.</p></li>
<li><p>If a class needs a member function to change a user-visible attribute, the change should be done with a &quot;setter&quot; accessor matched to the simple &quot;getter&quot;.</p></li>
</ul>
<h3 id="files">Files</h3>
<h3 id="source-files">Source Files</h3>
<ul>
<li><p>All source files must have a globally unique basename. The build system depends on this uniqueness.</p></li>
<li><p>Do not put non-trivial function implementations in .hpp files. If the implementation depends on other .hpp files, put it in a .cpp or a .inline.hpp file.</p></li>
@@ -97,6 +98,15 @@ <h3 id="files">Files</h3>
<li><p>Keep the include lines alphabetically sorted.</p></li>
<li><p>Put conditional inclusions (<code>#if ...</code>) at the end of the include list.</p></li>
</ul>
<h3 id="jtreg-tests">JTReg Tests</h3>
<ul>
<li><p>JTReg tests should have meaningful names.</p></li>
<li><p>JTReg tests associated with specific bugs should be tagged with the <code>@bug</code> keyword in the test description.</p></li>
<li><p>JTReg tests should be organized by component or feature under <code>test/</code>, in a directory hierarchy that generally follows that of the <code>src/</code> directory. There may be additional subdirectories to further categorize tests by feature. This structure makes it easy to run a collection of tests associated with a specific feature by specifying the associated directory as the source of the tests to run.</p>
<ul>
<li>Some (older) tests use the associated bug number in the directory name, the test name, or both. That naming style should no longer be used, with existing tests using that style being candidates for migration.</li>
</ul></li>
</ul>
<h3 id="naming">Naming</h3>
<ul>
<li><p>The length of a name may be correlated to the size of its scope. In particular, short names (even single letter names) may be fine in a small scope, but are usually inappropriate for larger scopes.</p></li>
@@ -126,7 +126,7 @@ lines of code. Name what you must repeat.
change should be done with a "setter" accessor matched to the simple
"getter".

### Files
### Source Files

* All source files must have a globally unique basename. The build
system depends on this uniqueness.
@@ -147,6 +147,24 @@ it to resolve include problems.

* Put conditional inclusions (`#if ...`) at the end of the include list.

### JTReg Tests

* JTReg tests should have meaningful names.

* JTReg tests associated with specific bugs should be tagged with the
`@bug` keyword in the test description.

* JTReg tests should be organized by component or feature under
`test/`, in a directory hierarchy that generally follows that of the
`src/` directory. There may be additional subdirectories to further
categorize tests by feature. This structure makes it easy to run a
collection of tests associated with a specific feature by specifying
the associated directory as the source of the tests to run.

* Some (older) tests use the associated bug number in the directory
name, the test name, or both. That naming style should no longer be
used, with existing tests using that style being candidates for migration.

### Naming

* The length of a name may be correlated to the size of its scope. In

Large diffs are not rendered by default.

0 comments on commit 63a4356

Please sign in to comment.