8339876: Move constant symbol caches to Utf8EntryImpl

Reviewed-by: redestad
This commit is contained in:
Chen Liang 2024-09-12 15:16:38 +00:00
parent 0765917dea
commit 4d65c3efca
19 changed files with 87 additions and 113 deletions

View file

@ -31,6 +31,7 @@ import java.util.Optional;
import java.lang.classfile.constantpool.Utf8Entry;
import jdk.internal.classfile.impl.BufferedFieldBuilder;
import jdk.internal.classfile.impl.FieldImpl;
import jdk.internal.classfile.impl.Util;
import jdk.internal.javac.PreviewFeature;
/**
@ -59,6 +60,6 @@ public sealed interface FieldModel
/** {@return the field descriptor of this field, as a symbolic descriptor} */
default ClassDesc fieldTypeSymbol() {
return ClassDesc.ofDescriptor(fieldType().stringValue());
return Util.fieldTypeSymbol(fieldType());
}
}