On second thought, you should also use invokeWithArguments to support jumbo arities.
This tricky idiom should be put into a utility method, package private for starters. A version of it also appears in BSM invocation code. > On Jan 31, 2018, at 3:23 PM, John Rose <john.r.r...@oracle.com> wrote: > > If you remove the old asType call it’s good! > >> On Jan 31, 2018, at 3:15 PM, Paul Sandoz <paul.san...@oracle.com> wrote: >> >> Hi, >> >> Please review this fix to the invoke BSM so that it preserves variable >> arity, if any: >> >> http://cr.openjdk.java.net/~psandoz/jdk/JDK-8195694-constant-bsms-invoke-arity/webrev/ >> >> <http://cr.openjdk.java.net/~psandoz/jdk/JDK-8195694-constant-bsms-invoke-arity/webrev/> >> >> This will be pushed to the hs repo. >> >> Thanks, >> Paul. >