--- old/src/java.base/share/classes/java/lang/invoke/LambdaFormEditor.java 2017-07-17 19:04:05.000000000 -0700 +++ new/src/java.base/share/classes/java/lang/invoke/LambdaFormEditor.java 2017-07-17 19:04:05.000000000 -0700 @@ -380,11 +380,11 @@ /// Editing methods for method handles. These need to have fast paths. - private BoundMethodHandle.SpeciesData oldSpeciesData() { - return BoundMethodHandle.speciesData(lambdaForm); + private BoundMethodHandle.BMHSpecies oldSpeciesData() { + return BoundMethodHandle.formSpeciesData(lambdaForm); } - private BoundMethodHandle.SpeciesData newSpeciesData(BasicType type) { - return oldSpeciesData().extendWith(type); + private BoundMethodHandle.BMHSpecies newSpeciesData(BasicType type) { + return oldSpeciesData().extendWith((byte) type.ordinal()); } BoundMethodHandle bindArgumentL(BoundMethodHandle mh, int pos, Object value) { @@ -446,8 +446,8 @@ LambdaFormBuffer buf = buffer(); buf.startEdit(); - BoundMethodHandle.SpeciesData oldData = oldSpeciesData(); - BoundMethodHandle.SpeciesData newData = newSpeciesData(lambdaForm.parameterType(pos)); + BoundMethodHandle.BMHSpecies oldData = oldSpeciesData(); + BoundMethodHandle.BMHSpecies newData = newSpeciesData(lambdaForm.parameterType(pos)); Name oldBaseAddress = lambdaForm.parameter(0); // BMH holding the values Name newBaseAddress; NamedFunction getter = newData.getterFunction(oldData.fieldCount()); @@ -461,7 +461,7 @@ buf.replaceParameterByNewExpression(pos, new Name(getter, newBaseAddress)); } else { // cannot bind the MH arg itself, unless oldData is empty - assert(oldData == BoundMethodHandle.SpeciesData.EMPTY); + assert(oldData == BoundMethodHandle.SPECIALIZER.topSpecies()); newBaseAddress = new Name(L_TYPE).withConstraint(newData); buf.replaceParameterByNewExpression(0, new Name(getter, newBaseAddress)); buf.insertParameter(0, newBaseAddress); @@ -653,8 +653,8 @@ assert(combinerType == combinerType.basicType()); assert(combinerType.returnType() != void.class || dropResult); - BoundMethodHandle.SpeciesData oldData = oldSpeciesData(); - BoundMethodHandle.SpeciesData newData = newSpeciesData(L_TYPE); + BoundMethodHandle.BMHSpecies oldData = oldSpeciesData(); + BoundMethodHandle.BMHSpecies newData = newSpeciesData(L_TYPE); // The newly created LF will run with a different BMH. // Switch over any pre-existing BMH field references to the new BMH class. @@ -716,8 +716,8 @@ assert(combinerType == combinerType.basicType()); assert(combinerType.returnType() != void.class || dropResult); - BoundMethodHandle.SpeciesData oldData = oldSpeciesData(); - BoundMethodHandle.SpeciesData newData = newSpeciesData(L_TYPE); + BoundMethodHandle.BMHSpecies oldData = oldSpeciesData(); + BoundMethodHandle.BMHSpecies newData = newSpeciesData(L_TYPE); // The newly created LF will run with a different BMH. // Switch over any pre-existing BMH field references to the new BMH class. @@ -786,8 +786,8 @@ else callFilter = new Name(constantZero(newType)); } else { - BoundMethodHandle.SpeciesData oldData = oldSpeciesData(); - BoundMethodHandle.SpeciesData newData = newSpeciesData(L_TYPE); + BoundMethodHandle.BMHSpecies oldData = oldSpeciesData(); + BoundMethodHandle.BMHSpecies newData = newSpeciesData(L_TYPE); // The newly created LF will run with a different BMH. // Switch over any pre-existing BMH field references to the new BMH class.