mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8331291: java.lang.classfile.Attributes class performs a lot of static initializations
Reviewed-by: liach, redestad, vromero
This commit is contained in:
parent
0c934ff4e2
commit
cfdc64fcb4
149 changed files with 1669 additions and 1323 deletions
|
@ -24,13 +24,12 @@
|
|||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import toolbox.ToolBox;
|
||||
|
||||
import java.lang.classfile.Attributes;
|
||||
import java.lang.classfile.BootstrapMethodEntry;
|
||||
import java.lang.classfile.ClassFile;
|
||||
import java.lang.classfile.ClassModel;
|
||||
import java.lang.classfile.CodeElement;
|
||||
import java.lang.classfile.CodeModel;
|
||||
import java.lang.classfile.MethodModel;
|
||||
import java.lang.classfile.attribute.CodeAttribute;
|
||||
import java.lang.classfile.constantpool.MethodHandleEntry;
|
||||
import java.lang.classfile.instruction.InvokeDynamicInstruction;
|
||||
import java.nio.file.Path;
|
||||
|
@ -87,7 +86,7 @@ public class TestIndyStringConcat {
|
|||
|
||||
for (MethodModel method : classFile.methods()) {
|
||||
if (method.methodName().equalsString(methodName)) {
|
||||
CodeAttribute code = method.findAttribute(Attributes.CODE).orElseThrow();
|
||||
CodeModel code = method.code().orElseThrow();
|
||||
for (CodeElement i : code.elementList()) {
|
||||
if (i instanceof InvokeDynamicInstruction indy) {
|
||||
BootstrapMethodEntry bsmSpec = indy.invokedynamic().bootstrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue