< prev index next >

src/java.base/share/classes/java/lang/invoke/LambdaForm.java

Print this page
rev 15669 : 8161211: better inlining support for loop bytecode intrinsics

*** 418,427 **** --- 418,434 ---- String sig = null; assert(isValidSignature(sig = basicTypeSignature())); assert(sig.equals(basicTypeSignature())) : sig + " != " + basicTypeSignature(); } + LambdaForm(MethodType mt, BoundMethodHandle.SpeciesData sd) { + // Make a blank lambda form (see the LambdaForm(MethodType) constructor) with a specific SpeciesData added as a + // constraint. This allows for using BoundMethodHandle instances as array substitutes. + this(mt); + names[0] = new Name(names[0], sd); + } + private static Name[] buildEmptyNames(int arity, MethodType mt, boolean isVoid) { Name[] names = arguments(isVoid ? 0 : 1, mt); if (!isVoid) { Name zero = new Name(constantZero(basicType(mt.returnType()))); names[arity] = zero.newIndex(arity);
*** 1330,1340 **** this.function = function; this.arguments = arguments; this.constraint = null; assert(this.index == index); } ! private Name(Name that, Object constraint) { this.index = that.index; this.type = that.type; this.function = that.function; this.arguments = that.arguments; this.constraint = constraint; --- 1337,1347 ---- this.function = function; this.arguments = arguments; this.constraint = null; assert(this.index == index); } ! Name(Name that, Object constraint) { this.index = that.index; this.type = that.type; this.function = that.function; this.arguments = that.arguments; this.constraint = constraint;
< prev index next >