-
Enhancement
-
Resolution: Fixed
-
P3
-
None
-
repo-panama
Over the years we have encountered many cases where we'd like some kind of power-user opt-in to select a slightly different point in the safety vs. performance trade off:
* Should the Linker acquire/release by-ref parameters to prevent concurrent close?
* Should the Linker allow passing heap segments on certain parameters?
* Should the Linker omit state transitions when calling a native function (e.g. a leaf) ?
* Should the Linker avoid defensive copying when spilling segments on the stack?
* Should the Linker make defensive copies of sensitive values such as errno, or LastError? (see https://mail.openjdk.org/pipermail/panama-dev/2022-August/017339.html)
There are many possible ways to get there. Whatever we choose to do should be consistent with how we attach variadic info to downcall parameters (right now we do that with special function descriptors, but we could also use different approaches).
* Should the Linker acquire/release by-ref parameters to prevent concurrent close?
* Should the Linker allow passing heap segments on certain parameters?
* Should the Linker omit state transitions when calling a native function (e.g. a leaf) ?
* Should the Linker avoid defensive copying when spilling segments on the stack?
* Should the Linker make defensive copies of sensitive values such as errno, or LastError? (see https://mail.openjdk.org/pipermail/panama-dev/2022-August/017339.html)
There are many possible ways to get there. Whatever we choose to do should be consistent with how we attach variadic info to downcall parameters (right now we do that with special function descriptors, but we could also use different approaches).