Skip to content

[JExtract] Static 'call' method in binding descriptor classes #246

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

Merged
merged 1 commit into from
Jun 5, 2025

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Jun 5, 2025

  • Add a static call method to each binding descriptor class to handle the actual downcall.
  • Refactor wrapper methods to delegate to the binding descriptor's call method.
  • Clearly separate responsibilities: each binding descriptor class now encapsulates the complete lowered Cdecl thunk, while wrapper methods focus on Java-to-Cdecl type conversion.

* Add a static call method to each binding descriptor class to handle the
  actual downcall.
* Refactor wrapper methods to delegate to the binding descriptor's call
  method.
* Clearly separate responsibilities: each binding descriptor class now
  encapsulates the complete lowered Cdecl thunk, while wrapper methods
  focus on Java-to-Cdecl type conversion.
Copy link
Collaborator

@ktoso ktoso 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 to me, you're right that centralizing the func description like that is nice 👍

@rintaro rintaro merged commit 7842e8d into swiftlang:main Jun 5, 2025
12 checks passed
@rintaro rintaro deleted the jextract-descritor-call branch June 5, 2025 04:58
@rintaro rintaro restored the jextract-descritor-call branch June 5, 2025 05:20
@rintaro rintaro deleted the jextract-descritor-call branch June 5, 2025 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants