8222502: Replace 19,20 case alternatives with JVM_CONSTANT_Module/Package names
Add JVM_CONSTANT_Module and JVM_CONSTANT_Package to classfile_constants.h Reviewed-by: coleenp, hseigel
This commit is contained in:
parent
86eaf87d1f
commit
4f2478e234
@ -126,7 +126,8 @@
|
||||
#define JAVA_13_VERSION 57
|
||||
|
||||
void ClassFileParser::set_class_bad_constant_seen(short bad_constant) {
|
||||
assert((bad_constant == 19 || bad_constant == 20) && _major_version >= JAVA_9_VERSION,
|
||||
assert((bad_constant == JVM_CONSTANT_Module ||
|
||||
bad_constant == JVM_CONSTANT_Package) && _major_version >= JAVA_9_VERSION,
|
||||
"Unexpected bad constant pool entry");
|
||||
if (_bad_constant_seen == 0) _bad_constant_seen = bad_constant;
|
||||
}
|
||||
@ -343,8 +344,8 @@ void ClassFileParser::parse_constant_pool_entries(const ClassFileStream* const s
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 19:
|
||||
case 20: {
|
||||
case JVM_CONSTANT_Module:
|
||||
case JVM_CONSTANT_Package: {
|
||||
// Record that an error occurred in these two cases but keep parsing so
|
||||
// that ACC_Module can be checked for in the access_flags. Need to
|
||||
// throw NoClassDefFoundError in that case.
|
||||
|
@ -417,6 +417,8 @@
|
||||
declare_constant(JVM_CONSTANT_MethodHandle) \
|
||||
declare_constant(JVM_CONSTANT_MethodType) \
|
||||
declare_constant(JVM_CONSTANT_InvokeDynamic) \
|
||||
declare_constant(JVM_CONSTANT_Module) \
|
||||
declare_constant(JVM_CONSTANT_Package) \
|
||||
declare_constant(JVM_CONSTANT_ExternalMax) \
|
||||
\
|
||||
declare_constant(JVM_CONSTANT_Invalid) \
|
||||
|
@ -2095,6 +2095,8 @@ typedef PaddedEnd<ObjectMonitor> PaddedObjectMonitor;
|
||||
declare_constant(JVM_CONSTANT_MethodType) \
|
||||
declare_constant(JVM_CONSTANT_Dynamic) \
|
||||
declare_constant(JVM_CONSTANT_InvokeDynamic) \
|
||||
declare_constant(JVM_CONSTANT_Module) \
|
||||
declare_constant(JVM_CONSTANT_Package) \
|
||||
declare_constant(JVM_CONSTANT_ExternalMax) \
|
||||
\
|
||||
declare_constant(JVM_CONSTANT_Invalid) \
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -109,7 +109,9 @@ enum {
|
||||
JVM_CONSTANT_MethodType = 16, // JSR 292
|
||||
JVM_CONSTANT_Dynamic = 17,
|
||||
JVM_CONSTANT_InvokeDynamic = 18,
|
||||
JVM_CONSTANT_ExternalMax = 18
|
||||
JVM_CONSTANT_Module = 19,
|
||||
JVM_CONSTANT_Package = 20,
|
||||
JVM_CONSTANT_ExternalMax = 20
|
||||
};
|
||||
|
||||
/* JVM_CONSTANT_MethodHandle subtypes */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -44,6 +44,8 @@ public interface ClassConstants
|
||||
public static final int JVM_CONSTANT_MethodType = 16;
|
||||
public static final int JVM_CONSTANT_Dynamic = 17;
|
||||
public static final int JVM_CONSTANT_InvokeDynamic = 18;
|
||||
public static final int JVM_CONSTANT_Module = 19;
|
||||
public static final int JVM_CONSTANT_Package = 20;
|
||||
|
||||
// JVM_CONSTANT_MethodHandle subtypes
|
||||
public static final int JVM_REF_getField = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user