On Wed, 2 Nov 2022 17:06:50 GMT, Jorn Vernee <jver...@openjdk.org> wrote:
>> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add @SafeVarargs declarations > > src/java.base/share/classes/java/lang/runtime/TemplateSupport.java line 141: > >> 139: MethodType processorGetterType = >> MethodType.methodType(ValidatingProcessor.class); >> 140: ValidatingProcessor<?, ?> processor = >> 141: (ValidatingProcessor<?, >> ?>)processorGetter.asType(processorGetterType).invokeExact(); > > Essentially the same as: > Suggestion: > > ValidatingProcessor<?, ?> processor = (ValidatingProcessor<?, > ?>)processorGetter.invoke(); Changing > src/java.base/share/classes/java/lang/template/ProcessorLinkage.java line 60: > >> 58: * @throws NullPointerException if any of the arguments are null >> 59: */ >> 60: MethodHandle linkage(List<String> fragments, MethodType type); > > I suggest changing the protocol here to be able to take all bootstrap > arguments into account, and return a `CallSite` instead. That will allow a > `ProcessorLinkage` to take the lookup and name into account as well, and > allows returning e.g. a `MutableCallSite` as well. > > Maybe this can still be changed later as well though, since the interface is > sealed. Yes - this will all go away during preview. ------------- PR: https://git.openjdk.org/jdk/pull/10889