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

8245003: jextract does not generate accessor for MemorySegement typed values #165

Closed

Conversation

@sundararajana
Copy link
Member

@sundararajana sundararajana commented May 14, 2020

addressof accessor added for MemorySegment typed values (structs, unions, arrays).


Progress

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

Issue

  • JDK-8245003: jextract does not generate accessor for MemorySegement typed values

Reviewers

Download

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

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented May 14, 2020

👋 Welcome back sundar! 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 14, 2020
@mlbridge
Copy link

@mlbridge mlbridge bot commented May 14, 2020

Webrevs

Copy link
Member

@JornVernee JornVernee left a comment

LGTM

For global variables, the MemorySegment that is created needs to have the old address as an attachment, so that the library is kept alive by the returned MemorySegment.

Also, it does not need to be thread confined (can just pass null as owner thread), as long as you also drop the CLOSE access mode of the returned segment (in that case no race can occur). Lifetime of libraries is managed by the GC, so as long as the user has a reference to the returned MemorySegment, the library will be alive, and so will the global variable.

@openjdk
Copy link

@openjdk openjdk bot commented May 14, 2020

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

8245003: jextract does not generate accessor for MemorySegement typed values

Reviewed-by: jvernee, mcimadamore
  • 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 /solves command.

Since the source branch of this PR was last updated there has been 1 commit pushed to the foreign-jextract branch:

  • fa9ef4b: 8245003: jextract does not generate accessor for MemorySegement typed values

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 fa9ef4be86c1c8f0a47e2848da3d43f1b9983e3b.

➡️ 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 14, 2020
…hould not be non-closeable.

This additional change was contributed by jvernee.
Copy link
Collaborator

@mcimadamore mcimadamore left a comment

Looks good

@sundararajana
Copy link
Member Author

@sundararajana sundararajana commented May 14, 2020

/integrate

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

@openjdk openjdk bot commented May 14, 2020

@sundararajana
Pushed as commit fa9ef4b.

@sundararajana sundararajana deleted the sundararajana:JDK-8245003 branch May 14, 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

3 participants
You can’t perform that action at this time.