< prev index next >

src/hotspot/share/classfile/classFileParser.cpp

Print this page




 102 // Used for backward compatibility reasons:
 103 // - to check for javac bug fixes that happened after 1.5
 104 // - also used as the max version when running in jdk6
 105 #define JAVA_6_VERSION                    50
 106 
 107 // Used for backward compatibility reasons:
 108 // - to disallow argument and require ACC_STATIC for <clinit> methods
 109 #define JAVA_7_VERSION                    51
 110 
 111 // Extension method support.
 112 #define JAVA_8_VERSION                    52
 113 
 114 #define JAVA_9_VERSION                    53
 115 
 116 #define JAVA_10_VERSION                   54
 117 
 118 #define JAVA_11_VERSION                   55
 119 
 120 #define JAVA_12_VERSION                   56
 121 


 122 void ClassFileParser::set_class_bad_constant_seen(short bad_constant) {
 123   assert((bad_constant == 19 || bad_constant == 20) && _major_version >= JAVA_9_VERSION,
 124          "Unexpected bad constant pool entry");
 125   if (_bad_constant_seen == 0) _bad_constant_seen = bad_constant;
 126 }
 127 
 128 void ClassFileParser::parse_constant_pool_entries(const ClassFileStream* const stream,
 129                                                   ConstantPool* cp,
 130                                                   const int length,
 131                                                   TRAPS) {
 132   assert(stream != NULL, "invariant");
 133   assert(cp != NULL, "invariant");
 134 
 135   // Use a local copy of ClassFileStream. It helps the C++ compiler to optimize
 136   // this function (_current can be allocated in a register, with scalar
 137   // replacement of aggregates). The _current pointer is copied back to
 138   // stream() when this function returns. DON'T call another method within
 139   // this method that uses stream().
 140   const ClassFileStream cfs1 = *stream;
 141   const ClassFileStream* const cfs = &cfs1;




 102 // Used for backward compatibility reasons:
 103 // - to check for javac bug fixes that happened after 1.5
 104 // - also used as the max version when running in jdk6
 105 #define JAVA_6_VERSION                    50
 106 
 107 // Used for backward compatibility reasons:
 108 // - to disallow argument and require ACC_STATIC for <clinit> methods
 109 #define JAVA_7_VERSION                    51
 110 
 111 // Extension method support.
 112 #define JAVA_8_VERSION                    52
 113 
 114 #define JAVA_9_VERSION                    53
 115 
 116 #define JAVA_10_VERSION                   54
 117 
 118 #define JAVA_11_VERSION                   55
 119 
 120 #define JAVA_12_VERSION                   56
 121 
 122 #define JAVA_13_VERSION                   57
 123 
 124 void ClassFileParser::set_class_bad_constant_seen(short bad_constant) {
 125   assert((bad_constant == 19 || bad_constant == 20) && _major_version >= JAVA_9_VERSION,
 126          "Unexpected bad constant pool entry");
 127   if (_bad_constant_seen == 0) _bad_constant_seen = bad_constant;
 128 }
 129 
 130 void ClassFileParser::parse_constant_pool_entries(const ClassFileStream* const stream,
 131                                                   ConstantPool* cp,
 132                                                   const int length,
 133                                                   TRAPS) {
 134   assert(stream != NULL, "invariant");
 135   assert(cp != NULL, "invariant");
 136 
 137   // Use a local copy of ClassFileStream. It helps the C++ compiler to optimize
 138   // this function (_current can be allocated in a register, with scalar
 139   // replacement of aggregates). The _current pointer is copied back to
 140   // stream() when this function returns. DON'T call another method within
 141   // this method that uses stream().
 142   const ClassFileStream cfs1 = *stream;
 143   const ClassFileStream* const cfs = &cfs1;


< prev index next >