diff --git a/src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java b/src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java index 4fbbec1769364..97848e1fcb3e5 100644 --- a/src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java +++ b/src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java @@ -1526,7 +1526,7 @@ public void accept(CodeBuilder cb) { * 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 void accept(CodeBuilder cb) { * length -= suffix.length(); */ if (staticConcat) { - cb.ldc(constants[paramCount].length()) + cb.loadConstant(constants[paramCount].length()) .isub() .istore(lengthSlot); } else { @@ -1557,7 +1557,7 @@ public void accept(CodeBuilder cb) { .getfield(concatClass, "constants", CD_Array_String) .dup() .astore(constantsSlot) - .ldc(paramCount) + .loadConstant(paramCount) .aaload() .dup() .astore(suffixSlot) @@ -1572,7 +1572,7 @@ public void accept(CodeBuilder cb) { * buf = newArrayWithSuffix(suffix, length, coder) */ if (staticConcat) { - cb.ldc(constants[paramCount]); + cb.loadConstant(constants[paramCount]); } else { cb.aload(suffixSlot); } @@ -1759,10 +1759,10 @@ public void accept(CodeBuilder cb) { .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(); } diff --git a/src/java.base/share/classes/java/lang/runtime/SwitchBootstraps.java b/src/java.base/share/classes/java/lang/runtime/SwitchBootstraps.java index bfdb76e2ef1b6..f380cf1070d1d 100644 --- a/src/java.base/share/classes/java/lang/runtime/SwitchBootstraps.java +++ b/src/java.base/share/classes/java/lang/runtime/SwitchBootstraps.java @@ -659,7 +659,7 @@ private static Consumer generateTypeSwitchSkeleton(Class selecto 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 || diff --git a/src/jdk.jfr/share/classes/jdk/jfr/internal/EventClassBuilder.java b/src/jdk.jfr/share/classes/jdk/jfr/internal/EventClassBuilder.java index 523622084843c..1373c3ca4968f 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/EventClassBuilder.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/EventClassBuilder.java @@ -84,7 +84,7 @@ private void buildSetMethod(ClassBuilder builder) { int index = 0; for (ValueDescriptor v : fields) { codeBuilder.iload(1); - codeBuilder.ldc(index); + codeBuilder.loadConstant(index); Label notEqual = codeBuilder.newLabel(); codeBuilder.if_icmpne(notEqual); codeBuilder.aload(0); // this diff --git a/src/jdk.jfr/share/classes/jdk/jfr/internal/EventInstrumentation.java b/src/jdk.jfr/share/classes/jdk/jfr/internal/EventInstrumentation.java index 71dc97d114e2c..d962a535829ef 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/EventInstrumentation.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/EventInstrumentation.java @@ -499,7 +499,7 @@ private void makeInstrumented() { // if (!settingsMethod(eventConfiguration.settingX)) goto fail; codeBuilder.aload(0); getEventConfiguration(codeBuilder); - codeBuilder.ldc(index); + codeBuilder.loadConstant(index); invokevirtual(codeBuilder, TYPE_EVENT_CONFIGURATION, METHOD_EVENT_CONFIGURATION_GET_SETTING); MethodTypeDesc mdesc = MethodTypeDesc.ofDescriptor("(" + sd.paramType().descriptorString() + ")Z"); codeBuilder.checkcast(sd.paramType());