2809 _cp->tag_at(bootstrap_method_index).is_method_handle(),
2810 "bootstrap_method_index %u has bad constant type in class file %s",
2811 bootstrap_method_index,
2812 CHECK);
2813 operands->at_put(operand_fill_index++, bootstrap_method_index);
2814 operands->at_put(operand_fill_index++, argument_count);
2815
2816 cfs->guarantee_more(sizeof(u2) * argument_count, CHECK); // argv[argc]
2817 for (int j = 0; j < argument_count; j++) {
2818 u2 argument_index = cfs->get_u2_fast();
2819 check_property(
2820 valid_cp_range(argument_index, cp_size) &&
2821 _cp->tag_at(argument_index).is_loadable_constant(),
2822 "argument_index %u has bad constant type in class file %s",
2823 argument_index,
2824 CHECK);
2825 operands->at_put(operand_fill_index++, argument_index);
2826 }
2827 }
2828
2829 assert(operand_fill_index == operands->length(), "exact fill");
2830 assert(ConstantPool::operand_array_length(operands) == attribute_array_length, "correct decode");
2831
2832 u1* current_end = cfs->current();
2833 guarantee_property(current_end == current_start + attribute_byte_length,
2834 "Bad length on BootstrapMethods in class file %s",
2835 CHECK);
2836 }
2837
2838 void ClassFileParser::parse_classfile_attributes(ClassFileParser::ClassAnnotationCollector* parsed_annotations,
2839 TRAPS) {
2840 ClassFileStream* cfs = stream();
2841 // Set inner classes attribute to default sentinel
2842 _inner_classes = Universe::the_empty_short_array();
2843 cfs->guarantee_more(2, CHECK); // attributes_count
2844 u2 attributes_count = cfs->get_u2_fast();
2845 bool parsed_sourcefile_attribute = false;
2846 bool parsed_innerclasses_attribute = false;
2847 bool parsed_enclosingmethod_attribute = false;
2848 bool parsed_bootstrap_methods_attribute = false;
2849 u1* runtime_visible_annotations = NULL;
|
2809 _cp->tag_at(bootstrap_method_index).is_method_handle(),
2810 "bootstrap_method_index %u has bad constant type in class file %s",
2811 bootstrap_method_index,
2812 CHECK);
2813 operands->at_put(operand_fill_index++, bootstrap_method_index);
2814 operands->at_put(operand_fill_index++, argument_count);
2815
2816 cfs->guarantee_more(sizeof(u2) * argument_count, CHECK); // argv[argc]
2817 for (int j = 0; j < argument_count; j++) {
2818 u2 argument_index = cfs->get_u2_fast();
2819 check_property(
2820 valid_cp_range(argument_index, cp_size) &&
2821 _cp->tag_at(argument_index).is_loadable_constant(),
2822 "argument_index %u has bad constant type in class file %s",
2823 argument_index,
2824 CHECK);
2825 operands->at_put(operand_fill_index++, argument_index);
2826 }
2827 }
2828
2829 assert(ConstantPool::operand_array_length(operands) == attribute_array_length, "correct decode");
2830
2831 u1* current_end = cfs->current();
2832 guarantee_property(current_end == current_start + attribute_byte_length,
2833 "Bad length on BootstrapMethods in class file %s",
2834 CHECK);
2835 }
2836
2837 void ClassFileParser::parse_classfile_attributes(ClassFileParser::ClassAnnotationCollector* parsed_annotations,
2838 TRAPS) {
2839 ClassFileStream* cfs = stream();
2840 // Set inner classes attribute to default sentinel
2841 _inner_classes = Universe::the_empty_short_array();
2842 cfs->guarantee_more(2, CHECK); // attributes_count
2843 u2 attributes_count = cfs->get_u2_fast();
2844 bool parsed_sourcefile_attribute = false;
2845 bool parsed_innerclasses_attribute = false;
2846 bool parsed_enclosingmethod_attribute = false;
2847 bool parsed_bootstrap_methods_attribute = false;
2848 u1* runtime_visible_annotations = NULL;
|