comparison src/share/vm/classfile/classFileParser.cpp @ 179:1f809e010142

Merge
author kamg
date Fri, 06 Jun 2008 13:43:36 -0400
parents 437d03ea40b1 6b648fefb395
children d1605aabd0a1
comparison
equal deleted inserted replaced
175:f2759c126e9d 179:1f809e010142
42 // - to check for bug fixes in the format checker in JDK1.5 42 // - to check for bug fixes in the format checker in JDK1.5
43 #define JAVA_1_5_VERSION 49 43 #define JAVA_1_5_VERSION 49
44 44
45 // Used for backward compatibility reasons: 45 // Used for backward compatibility reasons:
46 // - to check for javac bug fixes that happened after 1.5 46 // - to check for javac bug fixes that happened after 1.5
47 // - also used as the max version when running in jdk6
47 #define JAVA_6_VERSION 50 48 #define JAVA_6_VERSION 50
48 49
49 50
50 void ClassFileParser::parse_constant_pool_entries(constantPoolHandle cp, int length, TRAPS) { 51 void ClassFileParser::parse_constant_pool_entries(constantPoolHandle cp, int length, TRAPS) {
51 // Use a local copy of ClassFileStream. It helps the C++ compiler to optimize 52 // Use a local copy of ClassFileStream. It helps the C++ compiler to optimize
3505 (is_public && is_private) || 3506 (is_public && is_private) ||
3506 (is_protected && is_private)); 3507 (is_protected && is_private));
3507 } 3508 }
3508 3509
3509 bool ClassFileParser::is_supported_version(u2 major, u2 minor) { 3510 bool ClassFileParser::is_supported_version(u2 major, u2 minor) {
3511 u2 max_version = JDK_Version::is_gte_jdk17x_version() ?
3512 JAVA_MAX_SUPPORTED_VERSION : JAVA_6_VERSION;
3510 return (major >= JAVA_MIN_SUPPORTED_VERSION) && 3513 return (major >= JAVA_MIN_SUPPORTED_VERSION) &&
3511 (major <= JAVA_MAX_SUPPORTED_VERSION) && 3514 (major <= max_version) &&
3512 ((major != JAVA_MAX_SUPPORTED_VERSION) || 3515 ((major != max_version) ||
3513 (minor <= JAVA_MAX_SUPPORTED_MINOR_VERSION)); 3516 (minor <= JAVA_MAX_SUPPORTED_MINOR_VERSION));
3514 } 3517 }
3515 3518
3516 void ClassFileParser::verify_legal_field_modifiers( 3519 void ClassFileParser::verify_legal_field_modifiers(
3517 jint flags, bool is_interface, TRAPS) { 3520 jint flags, bool is_interface, TRAPS) {