mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
8341199: Use ClassFile's new API loadConstant(int)
Reviewed-by: liach, redestad
This commit is contained in:
parent
860d49db22
commit
f1bf469b4e
4 changed files with 9 additions and 9 deletions
|
@ -1526,7 +1526,7 @@ public final class StringConcatFactory {
|
|||
* length = length(this.length, arg0, arg1, ..., argN);
|
||||
*/
|
||||
if (staticConcat) {
|
||||
cb.ldc(length);
|
||||
cb.loadConstant(length);
|
||||
} else {
|
||||
cb.aload(thisSlot)
|
||||
.getfield(concatClass, "length", CD_int);
|
||||
|
@ -1549,7 +1549,7 @@ public final class StringConcatFactory {
|
|||
* length -= suffix.length();
|
||||
*/
|
||||
if (staticConcat) {
|
||||
cb.ldc(constants[paramCount].length())
|
||||
cb.loadConstant(constants[paramCount].length())
|
||||
.isub()
|
||||
.istore(lengthSlot);
|
||||
} else {
|
||||
|
@ -1557,7 +1557,7 @@ public final class StringConcatFactory {
|
|||
.getfield(concatClass, "constants", CD_Array_String)
|
||||
.dup()
|
||||
.astore(constantsSlot)
|
||||
.ldc(paramCount)
|
||||
.loadConstant(paramCount)
|
||||
.aaload()
|
||||
.dup()
|
||||
.astore(suffixSlot)
|
||||
|
@ -1572,7 +1572,7 @@ public final class StringConcatFactory {
|
|||
* buf = newArrayWithSuffix(suffix, length, coder)
|
||||
*/
|
||||
if (staticConcat) {
|
||||
cb.ldc(constants[paramCount]);
|
||||
cb.loadConstant(constants[paramCount]);
|
||||
} else {
|
||||
cb.aload(suffixSlot);
|
||||
}
|
||||
|
@ -1759,10 +1759,10 @@ public final class StringConcatFactory {
|
|||
.loadLocal(kind, cb.parameterSlot(i));
|
||||
|
||||
if (staticConcat) {
|
||||
cb.ldc(constants[i - 3]);
|
||||
cb.loadConstant(constants[i - 3]);
|
||||
} else {
|
||||
cb.aload(constantsSlot)
|
||||
.ldc(i - 4)
|
||||
.loadConstant(i - 4)
|
||||
.aaload();
|
||||
}
|
||||
|
||||
|
|
|
@ -659,7 +659,7 @@ public class SwitchBootstraps {
|
|||
MethodTypeDesc.of(ConstantDescs.CD_char));
|
||||
cb.labelBinding(compare);
|
||||
|
||||
cb.ldc(integerLabel);
|
||||
cb.loadConstant(integerLabel);
|
||||
cb.if_icmpne(next);
|
||||
} else if ((caseLabel instanceof Long ||
|
||||
caseLabel instanceof Float ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue