< prev index next >
src/java.base/share/classes/java/lang/invoke/LambdaFormEditor.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -539,11 +539,11 @@
int exprPos = lambdaForm.arity();
buf.insertExpression(exprPos++, checkSpread);
// adjust the arguments
MethodHandle aload = MethodHandles.arrayElementGetter(erasedArrayType);
for (int i = 0; i < arrayLength; i++) {
- Name loadArgument = new Name(aload, spreadParam, i);
+ Name loadArgument = new Name(new NamedFunction(aload, Intrinsic.ARRAY_LOAD), spreadParam, i);
buf.insertExpression(exprPos + i, loadArgument);
buf.replaceParameterByCopy(pos + i, exprPos + i);
}
buf.insertParameter(pos, spreadParam);
@@ -602,11 +602,12 @@
Name[] newParams = new Name[collectorArity];
for (int i = 0; i < collectorArity; i++) {
newParams[i] = new Name(pos + i, argType);
}
- Name callCombiner = new Name(arrayCollector, (Object[]) /*...*/ newParams);
+ Name callCombiner = new Name(new NamedFunction(arrayCollector, Intrinsic.NEW_ARRAY),
+ (Object[]) /*...*/ newParams);
// insert the new expression
int exprPos = lambdaForm.arity();
buf.insertExpression(exprPos, callCombiner);
< prev index next >