On Mon, 16 May 2022 17:40:41 GMT, Jorn Vernee <jver...@openjdk.org> wrote:
>> Hi, >> >> This PR brings over commits from the panama-foreign repo. These commits >> mostly pertain to the switch to ASM and away from MethodHandle combinators >> for the binding recipe specialization. But, there is one more commit which >> adds freeing of downcall stubs, since those changes were mostly Java as well. >> >> Thanks, >> Jorn >> >> Testing: `run-test-jdk_foreign` with `-Dgenerator.sample.factor=-1` on >> Windows and Linux. > > Jorn Vernee has updated the pull request incrementally with one additional > commit since the last revision: > > BootstrapMethodError -> ExceptionInInitializerError src/java.base/share/classes/jdk/internal/foreign/abi/BindingSpecializer.java line 98: > 96: private static final String CLASS_DATA_DESC = > methodType(Object.class, MethodHandles.Lookup.class, String.class, > Class.class).descriptorString(); > 97: private static final String RELEASE0_DESC = > methodType(void.class).descriptorString(); > 98: private static final String ACQUIRE0_DESC = > methodType(void.class).descriptorString(); calling methodType() is quite slow because of the cache of MethodType so maybe those initialization should be done explicitly in a static block to avoid to recompute methodType(long).descriptorString() several times src/java.base/share/classes/jdk/internal/foreign/abi/SoftReferenceCache.java line 42: > 40: > 41: private class Node { > 42: private SoftReference<V> ref; this code looks like a double check locking so ref should be volatile ------------- PR: https://git.openjdk.java.net/jdk/pull/8685