mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8186209: Tool support for ConstantDynamic
8186046: Minimal ConstantDynamic support 8190972: Ensure that AOT/Graal filters out class files containing CONSTANT_Dynamic ahead of full AOT support Co-authored-by: Lois Foltan <lois.foltan@oracle.com> Co-authored-by: John Rose <john.r.rose@oracle.com> Reviewed-by: acorn, coleenp, kvn
This commit is contained in:
parent
52d3bf29b2
commit
e55a05957d
114 changed files with 11762 additions and 404 deletions
|
@ -104,6 +104,13 @@ public class ConstantWriter extends BasicWriter {
|
|||
return 1;
|
||||
}
|
||||
|
||||
public Integer visitDynamicConstant(CONSTANT_Dynamic_info info, Void p) {
|
||||
print("#" + info.bootstrap_method_attr_index + ":#" + info.name_and_type_index);
|
||||
tab();
|
||||
println("// " + stringValue(info));
|
||||
return 1;
|
||||
}
|
||||
|
||||
public Integer visitLong(CONSTANT_Long_info info, Void p) {
|
||||
println(stringValue(info));
|
||||
return 2;
|
||||
|
@ -246,6 +253,8 @@ public class ConstantWriter extends BasicWriter {
|
|||
return "InterfaceMethod";
|
||||
case CONSTANT_InvokeDynamic:
|
||||
return "InvokeDynamic";
|
||||
case CONSTANT_Dynamic:
|
||||
return "Dynamic";
|
||||
case CONSTANT_NameAndType:
|
||||
return "NameAndType";
|
||||
default:
|
||||
|
@ -346,6 +355,15 @@ public class ConstantWriter extends BasicWriter {
|
|||
}
|
||||
}
|
||||
|
||||
public String visitDynamicConstant(CONSTANT_Dynamic_info info, Void p) {
|
||||
try {
|
||||
String callee = stringValue(info.getNameAndTypeInfo());
|
||||
return "#" + info.bootstrap_method_attr_index + ":" + callee;
|
||||
} catch (ConstantPoolException e) {
|
||||
return report(e);
|
||||
}
|
||||
}
|
||||
|
||||
public String visitLong(CONSTANT_Long_info info, Void p) {
|
||||
return info.value + "l";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue