[foreign-memaccess+abi] RFR: 8294970: Add linker option for saving thread-locals that the VM can overwrite
Jorn Vernee
jvernee at openjdk.org
Tue Oct 25 19:20:30 UTC 2022
On Tue, 25 Oct 2022 17:21:43 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> src/java.base/share/classes/java/lang/foreign/Linker.java line 326:
>>
>>> 324: * @see PreserveValue#supported()
>>> 325: */
>>> 326: static PreserveValue preserveValue(String... preservedValues) {
>>
>> I think I prefer `saveValue` - it's simpler, but means more or less the same thing.
>> Also, I think we should use the plural "saveValues" both in the factory and in the option interface.
>
> I also find it a bit odd that I can create a LinkerOption whose preservedValue is unrelated from the supported ones? E.g. I'd like to get an exception early, while it seems like the implementation will only give me an exception when I'm creating the downcall, which seems a tad late.
True. I think we can validate the names here. (I think I had that in a previous iteration as well).
-------------
PR: https://git.openjdk.org/panama-foreign/pull/742
More information about the panama-dev
mailing list