Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8318598: FFM stylistic cleanups #16286

Closed
wants to merge 7 commits into from
Closed

Conversation

JornVernee
Copy link
Member

@JornVernee JornVernee commented Oct 20, 2023

Port over stylistic changes from the panama-foreign repo. The following PRs are included:

Testing: jdk_foreign


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8318598: FFM stylistic cleanups (Enhancement - P4)

Reviewers

Contributors

  • Per Minborg <pminborg@openjdk.org>
  • Maurizio Cimadamore <mcimadamore@openjdk.org>

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/16286/head:pull/16286
$ git checkout pull/16286

Update a local copy of the PR:
$ git checkout pull/16286
$ git pull https://git.openjdk.org/jdk.git pull/16286/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 16286

View PR using the GUI difftool:
$ git pr show -t 16286

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/16286.diff

Webrev

Link to Webrev Comment

minborg and others added 7 commits October 20, 2023 12:48
Reviewed-by: jvernee
Reviewed-by: mcimadamore
Reviewed-by: mcimadamore
Reviewed-by: mcimadamore
Reviewed-by: mcimadamore
@JornVernee
Copy link
Member Author

/contributor add @minborg
/contributor add @mcimadamore

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 20, 2023

👋 Welcome back jvernee! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Oct 20, 2023

@JornVernee
Contributor Per Minborg <pminborg@openjdk.org> successfully added.

@openjdk
Copy link

openjdk bot commented Oct 20, 2023

@JornVernee
Contributor Maurizio Cimadamore <mcimadamore@openjdk.org> successfully added.

@openjdk
Copy link

openjdk bot commented Oct 20, 2023

@JornVernee The following label will be automatically applied to this pull request:

  • core-libs

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the core-libs core-libs-dev@openjdk.org label Oct 20, 2023
@JornVernee JornVernee marked this pull request as ready for review October 20, 2023 13:55
@openjdk openjdk bot added the rfr Pull request is ready for review label Oct 20, 2023
@mlbridge
Copy link

mlbridge bot commented Oct 20, 2023

Webrevs

@@ -83,56 +83,56 @@ public static MemorySegment makeNativeSegmentUnchecked(long min, long byteSize)
public static MemorySegment fromArray(byte[] arr) {
ensureInitialized();
Objects.requireNonNull(arr);
long byteSize = (long)arr.length * Unsafe.ARRAY_BYTE_INDEX_SCALE;
return new OfByte(Unsafe.ARRAY_BYTE_BASE_OFFSET, arr, byteSize, false,
long byteSize = (long)arr.length * Utils.BaseAndScale.BYTE.scale();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing up those

Copy link
Contributor

@mcimadamore mcimadamore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@openjdk
Copy link

openjdk bot commented Oct 20, 2023

@JornVernee This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8318598: FFM stylistic cleanups

Co-authored-by: Per Minborg <pminborg@openjdk.org>
Co-authored-by: Maurizio Cimadamore <mcimadamore@openjdk.org>
Reviewed-by: mcimadamore

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 5 new commits pushed to the master branch:

  • 4010642: 8077371: Binary files in JAXP test should be removed
  • fe52917: 8318457: Use prefix-less prepend methods directly to reduce branches in String concat expressions
  • 71c99a0: 8318448: Link PopupMenu/PopupMenuLocation.java failure to JDK-8259913
  • 2c23391: 8318101: Additional test cases for CSSAttributeEqualityBug
  • deadb9c: 8304684: Memory leak in DirectivesParser::set_option_flag

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Oct 20, 2023
@JornVernee
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Oct 20, 2023

Going to push as commit 8065233.
Since your change was applied there have been 8 commits pushed to the master branch:

  • b1228de: 8314588: gc/metaspace/TestMetaspaceInitialization.java failed "assert(capacity_until_gc >= committed_bytes) failed: capacity_until_gc: 3145728 < committed_bytes: 3211264"
  • 5a97411: 8317971: RISC-V: implement copySignF/D and signumF/D intrinsics
  • 9144287: 8318601: Remove javadoc text about restricted methods
  • 4010642: 8077371: Binary files in JAXP test should be removed
  • fe52917: 8318457: Use prefix-less prepend methods directly to reduce branches in String concat expressions
  • 71c99a0: 8318448: Link PopupMenu/PopupMenuLocation.java failure to JDK-8259913
  • 2c23391: 8318101: Additional test cases for CSSAttributeEqualityBug
  • deadb9c: 8304684: Memory leak in DirectivesParser::set_option_flag

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Oct 20, 2023
@openjdk openjdk bot closed this Oct 20, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Oct 20, 2023
@openjdk
Copy link

openjdk bot commented Oct 20, 2023

@JornVernee Pushed as commit 8065233.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@@ -653,27 +632,25 @@ public static void copy(MemorySegment srcSegment, ValueLayout srcLayout, long sr
Object dstArray, int dstIndex,
int elementCount) {

long baseAndScale = getBaseAndScale(dstArray.getClass());
var dstInfo = Utils.BaseAndScale.of(dstArray);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a case where I personally wouldn't use var because RHS is not clear, I have no idea what type dstInfo is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

4 participants