--- a/src/java.base/share/classes/java/lang/invoke/LambdaFormEditor.java Wed Nov 08 10:27:10 2017 -0800
+++ b/src/java.base/share/classes/java/lang/invoke/LambdaFormEditor.java Thu Nov 16 00:58:50 2017 +0100
@@ -381,10 +381,11 @@
/// Editing methods for method handles. These need to have fast paths.
private BoundMethodHandle.SpeciesData oldSpeciesData() {
- return BoundMethodHandle.speciesData(lambdaForm);
+ return BoundMethodHandle.speciesDataFor(lambdaForm);
}
+
private BoundMethodHandle.SpeciesData newSpeciesData(BasicType type) {
- return oldSpeciesData().extendWith(type);
+ return oldSpeciesData().extendWith((byte) type.ordinal());
}
BoundMethodHandle bindArgumentL(BoundMethodHandle mh, int pos, Object value) {
@@ -461,7 +462,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);