mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8339876: Move constant symbol caches to Utf8EntryImpl
Reviewed-by: redestad
This commit is contained in:
parent
0765917dea
commit
4d65c3efca
19 changed files with 87 additions and 113 deletions
|
@ -36,6 +36,7 @@ import java.lang.constant.ClassDesc;
|
|||
import jdk.internal.classfile.impl.AbstractPseudoInstruction;
|
||||
import jdk.internal.classfile.impl.BoundLocalVariable;
|
||||
import jdk.internal.classfile.impl.TemporaryConstantPool;
|
||||
import jdk.internal.classfile.impl.Util;
|
||||
import jdk.internal.javac.PreviewFeature;
|
||||
|
||||
/**
|
||||
|
@ -70,7 +71,7 @@ public sealed interface LocalVariable extends PseudoInstruction
|
|||
* {@return the local variable type, as a symbolic descriptor}
|
||||
*/
|
||||
default ClassDesc typeSymbol() {
|
||||
return ClassDesc.ofDescriptor(type().stringValue());
|
||||
return Util.fieldTypeSymbol(type());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -109,7 +110,7 @@ public sealed interface LocalVariable extends PseudoInstruction
|
|||
static LocalVariable of(int slot, String name, ClassDesc descriptor, Label startScope, Label endScope) {
|
||||
return of(slot,
|
||||
TemporaryConstantPool.INSTANCE.utf8Entry(name),
|
||||
TemporaryConstantPool.INSTANCE.utf8Entry(descriptor.descriptorString()),
|
||||
TemporaryConstantPool.INSTANCE.utf8Entry(descriptor),
|
||||
startScope, endScope);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue