< prev index next >

src/hotspot/share/classfile/classFileParser.cpp

Print this page




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




 100 #define JAVA_1_5_VERSION                  49
 101 
 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;


< prev index next >