Mercurial > hg > graal-jvmci-8
comparison src/share/vm/classfile/classFileParser.cpp @ 12067:e22ee8e7ae62
8021948: Change InstanceKlass::_source_file_name and _generic_signature from Symbol* to constant pool indexes.
Summary: Change InstanceKlass::_source_file_name and _generic_signature to u2 fields.
Reviewed-by: coleenp, iklam
author | jiangli |
---|---|
date | Mon, 19 Aug 2013 14:59:54 -0400 |
parents | 825e6cb66923 |
children | 91b93f523ec6 07b5f47d7a18 |
comparison
equal
deleted
inserted
replaced
12061:e5003079dfa5 | 12067:e22ee8e7ae62 |
---|---|
2588 u2 sourcefile_index = cfs->get_u2_fast(); | 2588 u2 sourcefile_index = cfs->get_u2_fast(); |
2589 check_property( | 2589 check_property( |
2590 valid_symbol_at(sourcefile_index), | 2590 valid_symbol_at(sourcefile_index), |
2591 "Invalid SourceFile attribute at constant pool index %u in class file %s", | 2591 "Invalid SourceFile attribute at constant pool index %u in class file %s", |
2592 sourcefile_index, CHECK); | 2592 sourcefile_index, CHECK); |
2593 set_class_sourcefile(_cp->symbol_at(sourcefile_index)); | 2593 set_class_sourcefile_index(sourcefile_index); |
2594 } | 2594 } |
2595 | 2595 |
2596 | 2596 |
2597 | 2597 |
2598 void ClassFileParser::parse_classfile_source_debug_extension_attribute(int length, TRAPS) { | 2598 void ClassFileParser::parse_classfile_source_debug_extension_attribute(int length, TRAPS) { |
2726 u2 signature_index = cfs->get_u2(CHECK); | 2726 u2 signature_index = cfs->get_u2(CHECK); |
2727 check_property( | 2727 check_property( |
2728 valid_symbol_at(signature_index), | 2728 valid_symbol_at(signature_index), |
2729 "Invalid constant pool index %u in Signature attribute in class file %s", | 2729 "Invalid constant pool index %u in Signature attribute in class file %s", |
2730 signature_index, CHECK); | 2730 signature_index, CHECK); |
2731 set_class_generic_signature(_cp->symbol_at(signature_index)); | 2731 set_class_generic_signature_index(signature_index); |
2732 } | 2732 } |
2733 | 2733 |
2734 void ClassFileParser::parse_classfile_bootstrap_methods_attribute(u4 attribute_byte_length, TRAPS) { | 2734 void ClassFileParser::parse_classfile_bootstrap_methods_attribute(u4 attribute_byte_length, TRAPS) { |
2735 ClassFileStream* cfs = stream(); | 2735 ClassFileStream* cfs = stream(); |
2736 u1* current_start = cfs->current(); | 2736 u1* current_start = cfs->current(); |
2973 } | 2973 } |
2974 | 2974 |
2975 void ClassFileParser::apply_parsed_class_attributes(instanceKlassHandle k) { | 2975 void ClassFileParser::apply_parsed_class_attributes(instanceKlassHandle k) { |
2976 if (_synthetic_flag) | 2976 if (_synthetic_flag) |
2977 k->set_is_synthetic(); | 2977 k->set_is_synthetic(); |
2978 if (_sourcefile != NULL) { | 2978 if (_sourcefile_index != 0) { |
2979 _sourcefile->increment_refcount(); | 2979 k->set_source_file_name_index(_sourcefile_index); |
2980 k->set_source_file_name(_sourcefile); | 2980 } |
2981 } | 2981 if (_generic_signature_index != 0) { |
2982 if (_generic_signature != NULL) { | 2982 k->set_generic_signature_index(_generic_signature_index); |
2983 _generic_signature->increment_refcount(); | |
2984 k->set_generic_signature(_generic_signature); | |
2985 } | 2983 } |
2986 if (_sde_buffer != NULL) { | 2984 if (_sde_buffer != NULL) { |
2987 k->set_source_debug_extension(_sde_buffer, _sde_length); | 2985 k->set_source_debug_extension(_sde_buffer, _sde_length); |
2988 } | 2986 } |
2989 } | 2987 } |