@@ -233,7 +233,7 @@ final BoundMethodHandle copyWith(MethodType mt, LambdaForm lf) {
233
233
/*non-public*/
234
234
final BoundMethodHandle copyWithExtendL (MethodType mt , LambdaForm lf , Object narg ) {
235
235
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 );
237
237
} catch (Throwable ex ) {
238
238
throw uncaughtException (ex );
239
239
}
@@ -242,7 +242,7 @@ final BoundMethodHandle copyWithExtendL(MethodType mt, LambdaForm lf, Object nar
242
242
/*non-public*/
243
243
final BoundMethodHandle copyWithExtendI (MethodType mt , LambdaForm lf , int narg ) {
244
244
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 );
246
246
} catch (Throwable ex ) {
247
247
throw uncaughtException (ex );
248
248
}
@@ -251,7 +251,7 @@ final BoundMethodHandle copyWithExtendI(MethodType mt, LambdaForm lf, int narg)
251
251
/*non-public*/
252
252
final BoundMethodHandle copyWithExtendJ (MethodType mt , LambdaForm lf , long narg ) {
253
253
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 );
255
255
} catch (Throwable ex ) {
256
256
throw uncaughtException (ex );
257
257
}
@@ -260,7 +260,7 @@ final BoundMethodHandle copyWithExtendJ(MethodType mt, LambdaForm lf, long narg)
260
260
/*non-public*/
261
261
final BoundMethodHandle copyWithExtendF (MethodType mt , LambdaForm lf , float narg ) {
262
262
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 );
264
264
} catch (Throwable ex ) {
265
265
throw uncaughtException (ex );
266
266
}
@@ -269,7 +269,7 @@ final BoundMethodHandle copyWithExtendF(MethodType mt, LambdaForm lf, float narg
269
269
/*non-public*/
270
270
final BoundMethodHandle copyWithExtendD (MethodType mt , LambdaForm lf , double narg ) {
271
271
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 );
273
273
} catch (Throwable ex ) {
274
274
throw uncaughtException (ex );
275
275
}
@@ -319,7 +319,7 @@ protected MethodHandle deriveTransformHelper(MemberName transform, int whichtm)
319
319
if (whichtm == Specializer .TN_COPY_NO_EXTEND ) {
320
320
return factory ();
321
321
} else if (whichtm < ARG_TYPE_LIMIT ) {
322
- return extendWith (( byte ) whichtm ).factory ();
322
+ return extendWith (BasicType . basicType (( byte ) whichtm ) ).factory ();
323
323
} else {
324
324
throw newInternalError ("bad transform" );
325
325
}
@@ -353,10 +353,11 @@ private boolean verifyTHAargs(MemberName transform, int whichtm, List<?> args, L
353
353
}
354
354
355
355
/*non-public*/
356
- SpeciesData extendWith (byte typeNum ) {
356
+ SpeciesData extendWith (BasicType basicType ) {
357
+ int typeNum = basicType .ordinal ();
357
358
SpeciesData sd = extensions [typeNum ];
358
359
if (sd != null ) return sd ;
359
- sd = SPECIALIZER .findSpecies (key () + BasicType . basicType ( typeNum ) .basicTypeChar ());
360
+ sd = SPECIALIZER .findSpecies (key () + basicType .basicTypeChar ());
360
361
extensions [typeNum ] = sd ;
361
362
return sd ;
362
363
}
@@ -406,7 +407,7 @@ protected BoundMethodHandle.SpeciesData newSpeciesData(String key) {
406
407
}
407
408
408
409
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 () ;
410
411
static {
411
412
final Class <BoundMethodHandle > BMH = BoundMethodHandle .class ;
412
413
// copyWithExtendLIJFD + copyWith
0 commit comments