mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8339260: Move rarely used constants out of ClassFile
Reviewed-by: asotona
This commit is contained in:
parent
47c10694c6
commit
8c8f0d85ce
37 changed files with 1545 additions and 1916 deletions
|
@ -32,7 +32,6 @@ import java.lang.classfile.Label;
|
|||
import java.lang.classfile.constantpool.ClassEntry;
|
||||
import jdk.internal.classfile.impl.StackMapDecoder;
|
||||
import jdk.internal.classfile.impl.TemporaryConstantPool;
|
||||
import static java.lang.classfile.ClassFile.*;
|
||||
import jdk.internal.javac.PreviewFeature;
|
||||
|
||||
/**
|
||||
|
@ -85,8 +84,39 @@ public sealed interface StackMapFrameInfo
|
|||
@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API)
|
||||
sealed interface VerificationTypeInfo {
|
||||
|
||||
/** The {@link #tag() tag} for verification type info {@link SimpleVerificationTypeInfo#TOP TOP}. */
|
||||
int ITEM_TOP = 0;
|
||||
|
||||
/** The {@link #tag() tag} for verification type info {@link SimpleVerificationTypeInfo#INTEGER INTEGER}. */
|
||||
int ITEM_INTEGER = 1;
|
||||
|
||||
/** The {@link #tag() tag} for verification type info {@link SimpleVerificationTypeInfo#FLOAT FLOAT}. */
|
||||
int ITEM_FLOAT = 2;
|
||||
|
||||
/** The {@link #tag() tag} for verification type info {@link SimpleVerificationTypeInfo#DOUBLE DOUBLE}. */
|
||||
int ITEM_DOUBLE = 3;
|
||||
|
||||
/** The {@link #tag() tag} for verification type info {@link SimpleVerificationTypeInfo#LONG LONG}. */
|
||||
int ITEM_LONG = 4;
|
||||
|
||||
/** The {@link #tag() tag} for verification type info {@link SimpleVerificationTypeInfo#NULL NULL}. */
|
||||
int ITEM_NULL = 5;
|
||||
|
||||
/** The {@link #tag() tag} for verification type info {@link SimpleVerificationTypeInfo#UNINITIALIZED_THIS UNINITIALIZED_THIS}. */
|
||||
int ITEM_UNINITIALIZED_THIS = 6;
|
||||
|
||||
/** The {@link #tag() tag} for verification type info {@link ObjectVerificationTypeInfo OBJECT}. */
|
||||
int ITEM_OBJECT = 7;
|
||||
|
||||
/** The {@link #tag() tag} for verification type info {@link UninitializedVerificationTypeInfo UNINITIALIZED}. */
|
||||
int ITEM_UNINITIALIZED = 8;
|
||||
|
||||
/**
|
||||
* {@return the tag of the type info}
|
||||
*
|
||||
* @apiNote
|
||||
* {@code ITEM_}-prefixed constants in this class, such as {@link #ITEM_TOP}, describe the
|
||||
* possible return values of this method.
|
||||
*/
|
||||
int tag();
|
||||
}
|
||||
|
@ -100,25 +130,25 @@ public sealed interface StackMapFrameInfo
|
|||
public enum SimpleVerificationTypeInfo implements VerificationTypeInfo {
|
||||
|
||||
/** verification type top */
|
||||
ITEM_TOP(VT_TOP),
|
||||
TOP(ITEM_TOP),
|
||||
|
||||
/** verification type int */
|
||||
ITEM_INTEGER(VT_INTEGER),
|
||||
INTEGER(ITEM_INTEGER),
|
||||
|
||||
/** verification type float */
|
||||
ITEM_FLOAT(VT_FLOAT),
|
||||
FLOAT(ITEM_FLOAT),
|
||||
|
||||
/** verification type double */
|
||||
ITEM_DOUBLE(VT_DOUBLE),
|
||||
DOUBLE(ITEM_DOUBLE),
|
||||
|
||||
/** verification type long */
|
||||
ITEM_LONG(VT_LONG),
|
||||
LONG(ITEM_LONG),
|
||||
|
||||
/** verification type null */
|
||||
ITEM_NULL(VT_NULL),
|
||||
NULL(ITEM_NULL),
|
||||
|
||||
/** verification type uninitializedThis */
|
||||
ITEM_UNINITIALIZED_THIS(VT_UNINITIALIZED_THIS);
|
||||
UNINITIALIZED_THIS(ITEM_UNINITIALIZED_THIS);
|
||||
|
||||
|
||||
private final int tag;
|
||||
|
@ -134,7 +164,7 @@ public sealed interface StackMapFrameInfo
|
|||
}
|
||||
|
||||
/**
|
||||
* A stack value for an object type.
|
||||
* A stack value for an object type. Its {@link #tag() tag} is {@value #ITEM_OBJECT}.
|
||||
*
|
||||
* @since 22
|
||||
*/
|
||||
|
@ -173,7 +203,7 @@ public sealed interface StackMapFrameInfo
|
|||
}
|
||||
|
||||
/**
|
||||
* An uninitialized stack value.
|
||||
* An uninitialized stack value. Its {@link #tag() tag} is {@value #ITEM_UNINITIALIZED}.
|
||||
*
|
||||
* @since 22
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue