hotspot/src/share/vm/classfile/classFileParser.cpp
changeset 38658 34f9c45625d8
parent 38177 b0c9cb06506b
child 38667 fa5c96533512
equal deleted inserted replaced
38657:3caf062361a6 38658:34f9c45625d8
  1399     }
  1399     }
  1400   }
  1400   }
  1401 
  1401 
  1402   FieldAllocationType update(bool is_static, BasicType type) {
  1402   FieldAllocationType update(bool is_static, BasicType type) {
  1403     FieldAllocationType atype = basic_type_to_atype(is_static, type);
  1403     FieldAllocationType atype = basic_type_to_atype(is_static, type);
  1404     // Make sure there is no overflow with injected fields.
  1404     if (atype != BAD_ALLOCATION_TYPE) {
  1405     assert(count[atype] < 0xFFFF, "More than 65535 fields");
  1405       // Make sure there is no overflow with injected fields.
  1406     count[atype]++;
  1406       assert(count[atype] < 0xFFFF, "More than 65535 fields");
       
  1407       count[atype]++;
       
  1408     }
  1407     return atype;
  1409     return atype;
  1408   }
  1410   }
  1409 };
  1411 };
  1410 
  1412 
  1411 // Side-effects: populates the _fields, _fields_annotations,
  1413 // Side-effects: populates the _fields, _fields_annotations,
  3333              !cp->tag_at(enclosing_method_method_index).is_name_and_type())) {
  3335              !cp->tag_at(enclosing_method_method_index).is_name_and_type())) {
  3334           classfile_parse_error("Invalid or out-of-bounds method index in EnclosingMethod attribute in class file %s", CHECK);
  3336           classfile_parse_error("Invalid or out-of-bounds method index in EnclosingMethod attribute in class file %s", CHECK);
  3335         }
  3337         }
  3336       } else if (tag == vmSymbols::tag_bootstrap_methods() &&
  3338       } else if (tag == vmSymbols::tag_bootstrap_methods() &&
  3337                  _major_version >= Verifier::INVOKEDYNAMIC_MAJOR_VERSION) {
  3339                  _major_version >= Verifier::INVOKEDYNAMIC_MAJOR_VERSION) {
  3338         if (parsed_bootstrap_methods_attribute)
  3340         if (parsed_bootstrap_methods_attribute) {
  3339           classfile_parse_error("Multiple BootstrapMethods attributes in class file %s", CHECK);
  3341           classfile_parse_error("Multiple BootstrapMethods attributes in class file %s", CHECK);
       
  3342         }
  3340         parsed_bootstrap_methods_attribute = true;
  3343         parsed_bootstrap_methods_attribute = true;
  3341         parse_classfile_bootstrap_methods_attribute(cfs, cp, attribute_length, CHECK);
  3344         parse_classfile_bootstrap_methods_attribute(cfs, cp, attribute_length, CHECK);
  3342       } else if (tag == vmSymbols::tag_runtime_visible_type_annotations()) {
  3345       } else if (tag == vmSymbols::tag_runtime_visible_type_annotations()) {
  3343         if (runtime_visible_type_annotations != NULL) {
  3346         if (runtime_visible_type_annotations != NULL) {
  3344           classfile_parse_error(
  3347           classfile_parse_error(