mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8191913: Bump classfile version number to 55
Co-authored-by: Erik Joelsson <erik.joelsson@oracle.com> Reviewed-by: dholmes, darcy
This commit is contained in:
parent
3851e0e030
commit
038b5f571c
28 changed files with 184 additions and 83 deletions
|
@ -86,8 +86,6 @@
|
|||
|
||||
#define JAVA_CLASSFILE_MAGIC 0xCAFEBABE
|
||||
#define JAVA_MIN_SUPPORTED_VERSION 45
|
||||
#define JAVA_MAX_SUPPORTED_VERSION 54
|
||||
#define JAVA_MAX_SUPPORTED_MINOR_VERSION 0
|
||||
|
||||
// Used for two backward compatibility reasons:
|
||||
// - to check for new additions to the class file format in JDK1.5
|
||||
|
@ -110,6 +108,8 @@
|
|||
|
||||
#define JAVA_10_VERSION 54
|
||||
|
||||
#define JAVA_11_VERSION 55
|
||||
|
||||
void ClassFileParser::set_class_bad_constant_seen(short bad_constant) {
|
||||
assert((bad_constant == 19 || bad_constant == 20) && _major_version >= JAVA_9_VERSION,
|
||||
"Unexpected bad constant pool entry");
|
||||
|
@ -4642,11 +4642,11 @@ static bool has_illegal_visibility(jint flags) {
|
|||
}
|
||||
|
||||
static bool is_supported_version(u2 major, u2 minor){
|
||||
const u2 max_version = JAVA_MAX_SUPPORTED_VERSION;
|
||||
const u2 max_version = JVM_CLASSFILE_MAJOR_VERSION;
|
||||
return (major >= JAVA_MIN_SUPPORTED_VERSION) &&
|
||||
(major <= max_version) &&
|
||||
((major != max_version) ||
|
||||
(minor <= JAVA_MAX_SUPPORTED_MINOR_VERSION));
|
||||
(minor <= JVM_CLASSFILE_MINOR_VERSION));
|
||||
}
|
||||
|
||||
void ClassFileParser::verify_legal_field_modifiers(jint flags,
|
||||
|
@ -5808,8 +5808,8 @@ void ClassFileParser::parse_stream(const ClassFileStream* const stream,
|
|||
_class_name->as_C_string(),
|
||||
_major_version,
|
||||
_minor_version,
|
||||
JAVA_MAX_SUPPORTED_VERSION,
|
||||
JAVA_MAX_SUPPORTED_MINOR_VERSION);
|
||||
JVM_CLASSFILE_MAJOR_VERSION,
|
||||
JVM_CLASSFILE_MINOR_VERSION);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue