-
Notifications
You must be signed in to change notification settings - Fork 35
Prototyping Swift Array Accessor #207
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
base: main
Are you sure you want to change the base?
Conversation
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10] | ||
} | ||
|
||
let DATA = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: make it not global and deal with lifetime
@@ -77,6 +91,15 @@ public class MySwiftClass { | |||
p("i:\(i)") | |||
} | |||
|
|||
// TODO: workaround until we expose properties again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: Seems we didn't yet finish moving to the "thunk way" the properties, gotta do that.
// ==== ------------------------------------------------------------------------ | ||
// swap | ||
|
||
public Wrapped swap(int i, int j) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixme, wrong signature
a5b2057
to
2d7fb88
Compare
2d7fb88
to
49d8ffa
Compare
This is fully expected to conflict a lot right now; I pulled pieces out from it and had changed around a bit to make incremental progress on value types support for now. |
Early prototyping of a type that is able to operate from Java on native Swift arrays without copying them out of Swift land.
The wrapper should be able to be generic and reasonably safe, where lifetime is managed with an arena, and it is typesafe when used with jextract imported types.