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

Move MemoryAddress::copy (jextract version) #171

Closed

Conversation

@mcimadamore
Copy link
Collaborator

@mcimadamore mcimadamore commented May 15, 2020

This patch addresses the remaining issues with jextrct templating mentioning the old MemoryAddress:copy method.


Progress

  • Change must not contain extraneous whitespace
  • Change must be properly reviewed

Reviewers

  • Jorn Vernee (jvernee - Committer)

Download

$ git fetch https://git.openjdk.java.net/panama-foreign pull/171/head:pull/171
$ git checkout pull/171

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented May 15, 2020

👋 Welcome back mcimadamore! A progress list of the required criteria for merging this PR into foreign-jextract will be added to the body of your pull request.

@openjdk openjdk bot added the rfr label May 15, 2020
@mlbridge
Copy link

@mlbridge mlbridge bot commented May 15, 2020

Webrevs

@@ -25,7 +25,7 @@ public class C-X {

private static void copy(MemoryAddress addr, ${CARRIER}[] arr) {
var heapSegment = MemorySegment.ofArray(arr);
MemoryAddress.copy(heapSegment.baseAddress(), addr, arr.length * sizeof());
addr.segment().copyFrom(heapSegment);

This comment has been minimized.

@JornVernee

JornVernee May 15, 2020
Member

The behavior is not necessarily the same if addr is not the base address of the segment. I think the right move here is to change the parameter from MemoryAddress to MemorySegment (same for Cstring).

@openjdk
Copy link

@openjdk openjdk bot commented May 15, 2020

@mcimadamore This change now passes all automated pre-integration checks, type /integrate in a new comment to proceed. After integration, the commit message will be:

Move MemoryAddress::copy (jextract version)

Reviewed-by: jvernee
  • If you would like to add a summary, use the /summary command.
  • To credit additional contributors, use the /contributor command.
  • To add additional solved issues, use the /issue command.

Since the source branch of this PR was last updated there have been 3 commits pushed to the foreign-jextract branch:

  • 3f7c7ac: Automatic merge of foreign-abi into foreign-jextract
  • f0c2d3a: Automatic merge of foreign-memaccess into foreign-abi
  • 0bc9c6b: Move MemoryAddress::copy (more review feedback)

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid automatic rebasing, please merge foreign-jextract into your branch, and then specify the current head hash when integrating, like this: /integrate 3f7c7acf0cef7048e04b03bd68104031336ef81f.

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

@openjdk openjdk bot added the ready label May 15, 2020
@mcimadamore
Copy link
Collaborator Author

@mcimadamore mcimadamore commented May 15, 2020

/integrate

@openjdk openjdk bot closed this May 15, 2020
@openjdk openjdk bot added integrated and removed ready rfr labels May 15, 2020
@openjdk
Copy link

@openjdk openjdk bot commented May 15, 2020

@mcimadamore The following commits have been pushed to foreign-jextract since your change was applied:

  • 3f7c7ac: Automatic merge of foreign-abi into foreign-jextract
  • f0c2d3a: Automatic merge of foreign-memaccess into foreign-abi
  • 0bc9c6b: Move MemoryAddress::copy (more review feedback)

Your commit was automatically rebased without conflicts.

Pushed as commit 6011a8c.

@mcimadamore mcimadamore deleted the mcimadamore:copyMove+jextract branch Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants