@@ -233,7 +233,7 @@ final BoundMethodHandle copyWith(MethodType mt, LambdaForm lf) {
233233 /*non-public*/
234234 final BoundMethodHandle copyWithExtendL (MethodType mt , LambdaForm lf , Object narg ) {
235235 try {
236- return (BoundMethodHandle ) BMH_SPECIES .extendWith (L_TYPE_NUM ).factory ().invokeBasic (mt , lf , argL0 , narg );
236+ return (BoundMethodHandle ) BMH_SPECIES .extendWith (L_TYPE ).factory ().invokeBasic (mt , lf , argL0 , narg );
237237 } catch (Throwable ex ) {
238238 throw uncaughtException (ex );
239239 }
@@ -242,7 +242,7 @@ final BoundMethodHandle copyWithExtendL(MethodType mt, LambdaForm lf, Object nar
242242 /*non-public*/
243243 final BoundMethodHandle copyWithExtendI (MethodType mt , LambdaForm lf , int narg ) {
244244 try {
245- return (BoundMethodHandle ) BMH_SPECIES .extendWith (I_TYPE_NUM ).factory ().invokeBasic (mt , lf , argL0 , narg );
245+ return (BoundMethodHandle ) BMH_SPECIES .extendWith (I_TYPE ).factory ().invokeBasic (mt , lf , argL0 , narg );
246246 } catch (Throwable ex ) {
247247 throw uncaughtException (ex );
248248 }
@@ -251,7 +251,7 @@ final BoundMethodHandle copyWithExtendI(MethodType mt, LambdaForm lf, int narg)
251251 /*non-public*/
252252 final BoundMethodHandle copyWithExtendJ (MethodType mt , LambdaForm lf , long narg ) {
253253 try {
254- return (BoundMethodHandle ) BMH_SPECIES .extendWith (J_TYPE_NUM ).factory ().invokeBasic (mt , lf , argL0 , narg );
254+ return (BoundMethodHandle ) BMH_SPECIES .extendWith (J_TYPE ).factory ().invokeBasic (mt , lf , argL0 , narg );
255255 } catch (Throwable ex ) {
256256 throw uncaughtException (ex );
257257 }
@@ -260,7 +260,7 @@ final BoundMethodHandle copyWithExtendJ(MethodType mt, LambdaForm lf, long narg)
260260 /*non-public*/
261261 final BoundMethodHandle copyWithExtendF (MethodType mt , LambdaForm lf , float narg ) {
262262 try {
263- return (BoundMethodHandle ) BMH_SPECIES .extendWith (F_TYPE_NUM ).factory ().invokeBasic (mt , lf , argL0 , narg );
263+ return (BoundMethodHandle ) BMH_SPECIES .extendWith (F_TYPE ).factory ().invokeBasic (mt , lf , argL0 , narg );
264264 } catch (Throwable ex ) {
265265 throw uncaughtException (ex );
266266 }
@@ -269,7 +269,7 @@ final BoundMethodHandle copyWithExtendF(MethodType mt, LambdaForm lf, float narg
269269 /*non-public*/
270270 final BoundMethodHandle copyWithExtendD (MethodType mt , LambdaForm lf , double narg ) {
271271 try {
272- return (BoundMethodHandle ) BMH_SPECIES .extendWith (D_TYPE_NUM ).factory ().invokeBasic (mt , lf , argL0 , narg );
272+ return (BoundMethodHandle ) BMH_SPECIES .extendWith (D_TYPE ).factory ().invokeBasic (mt , lf , argL0 , narg );
273273 } catch (Throwable ex ) {
274274 throw uncaughtException (ex );
275275 }
@@ -319,7 +319,7 @@ protected MethodHandle deriveTransformHelper(MemberName transform, int whichtm)
319319 if (whichtm == Specializer .TN_COPY_NO_EXTEND ) {
320320 return factory ();
321321 } else if (whichtm < ARG_TYPE_LIMIT ) {
322- return extendWith (( byte ) whichtm ).factory ();
322+ return extendWith (BasicType . basicType (( byte ) whichtm ) ).factory ();
323323 } else {
324324 throw newInternalError ("bad transform" );
325325 }
@@ -353,10 +353,11 @@ private boolean verifyTHAargs(MemberName transform, int whichtm, List<?> args, L
353353 }
354354
355355 /*non-public*/
356- SpeciesData extendWith (byte typeNum ) {
356+ SpeciesData extendWith (BasicType basicType ) {
357+ int typeNum = basicType .ordinal ();
357358 SpeciesData sd = extensions [typeNum ];
358359 if (sd != null ) return sd ;
359- sd = SPECIALIZER .findSpecies (key () + BasicType . basicType ( typeNum ) .basicTypeChar ());
360+ sd = SPECIALIZER .findSpecies (key () + basicType .basicTypeChar ());
360361 extensions [typeNum ] = sd ;
361362 return sd ;
362363 }
@@ -406,7 +407,7 @@ protected BoundMethodHandle.SpeciesData newSpeciesData(String key) {
406407 }
407408
408409 static final List <MemberName > BMH_TRANSFORMS ;
409- static final int TN_COPY_NO_EXTEND = V_TYPE_NUM ;
410+ static final int TN_COPY_NO_EXTEND = V_TYPE . ordinal () ;
410411 static {
411412 final Class <BoundMethodHandle > BMH = BoundMethodHandle .class ;
412413 // copyWithExtendLIJFD + copyWith
0 commit comments