137 varArgMethods.trimToSize(); |
137 varArgMethods.trimToSize(); |
138 |
138 |
139 final MethodHandle bound = SELECT_METHOD.bindTo(this); |
139 final MethodHandle bound = SELECT_METHOD.bindTo(this); |
140 final MethodHandle collecting = SingleDynamicMethod.collectArguments(bound, argNum).asType( |
140 final MethodHandle collecting = SingleDynamicMethod.collectArguments(bound, argNum).asType( |
141 callSiteType.changeReturnType(MethodHandle.class)); |
141 callSiteType.changeReturnType(MethodHandle.class)); |
142 invoker = MethodHandles.foldArguments(MethodHandles.exactInvoker(this.callSiteType), collecting); |
142 invoker = linkerServices.asTypeLosslessReturn(MethodHandles.foldArguments( |
|
143 MethodHandles.exactInvoker(this.callSiteType), collecting), callSiteType); |
143 } |
144 } |
144 |
145 |
145 MethodHandle getInvoker() { |
146 MethodHandle getInvoker() { |
146 return invoker; |
147 return invoker; |
147 } |
148 } |