8339217: Optimize ClassFile API loadConstant

Reviewed-by: liach, redestad, asotona
This commit is contained in:
Shaojin Wen 2024-09-21 00:21:04 +00:00
parent 08b25611f6
commit 2461263aac
2 changed files with 68 additions and 27 deletions

View file

@ -1645,7 +1645,7 @@ class InvokerBytecodeGenerator {
clb.withMethodBody("dummy", MTD_void, ACC_STATIC, new Consumer<>() {
@Override
public void accept(CodeBuilder cob) {
cob.loadConstant(os.toString());
cob.ldc(os.toString());
cob.pop();
cob.return_();
}