Mercurial > hg > truffle
comparison src/share/vm/classfile/classFileParser.cpp @ 6853:d804e148cff8
Merge
author | kvn |
---|---|
date | Fri, 12 Oct 2012 09:22:52 -0700 |
parents | d8ce2825b193 19eb999cb72c |
children | e52361627b65 |
comparison
equal
deleted
inserted
replaced
6842:b9a9ed0f8eeb | 6853:d804e148cff8 |
---|---|
814 // Call resolve_super so classcircularity is checked | 814 // Call resolve_super so classcircularity is checked |
815 Klass* k = SystemDictionary::resolve_super_or_fail(class_name, | 815 Klass* k = SystemDictionary::resolve_super_or_fail(class_name, |
816 unresolved_klass, class_loader, protection_domain, | 816 unresolved_klass, class_loader, protection_domain, |
817 false, CHECK_NULL); | 817 false, CHECK_NULL); |
818 interf = KlassHandle(THREAD, k); | 818 interf = KlassHandle(THREAD, k); |
819 | |
820 if (LinkWellKnownClasses) // my super type is well known to me | |
821 cp->klass_at_put(interface_index, interf()); // eagerly resolve | |
822 } | 819 } |
823 | 820 |
824 if (!Klass::cast(interf())->is_interface()) { | 821 if (!Klass::cast(interf())->is_interface()) { |
825 THROW_MSG_(vmSymbols::java_lang_IncompatibleClassChangeError(), "Implementing class", NULL); | 822 THROW_MSG_(vmSymbols::java_lang_IncompatibleClassChangeError(), "Implementing class", NULL); |
826 } | 823 } |
1006 static FieldAllocationType _basic_type_to_atype[2 * (T_CONFLICT + 1)] = { | 1003 static FieldAllocationType _basic_type_to_atype[2 * (T_CONFLICT + 1)] = { |
1007 BAD_ALLOCATION_TYPE, // 0 | 1004 BAD_ALLOCATION_TYPE, // 0 |
1008 BAD_ALLOCATION_TYPE, // 1 | 1005 BAD_ALLOCATION_TYPE, // 1 |
1009 BAD_ALLOCATION_TYPE, // 2 | 1006 BAD_ALLOCATION_TYPE, // 2 |
1010 BAD_ALLOCATION_TYPE, // 3 | 1007 BAD_ALLOCATION_TYPE, // 3 |
1011 NONSTATIC_BYTE , // T_BOOLEAN = 4, | 1008 NONSTATIC_BYTE , // T_BOOLEAN = 4, |
1012 NONSTATIC_SHORT, // T_CHAR = 5, | 1009 NONSTATIC_SHORT, // T_CHAR = 5, |
1013 NONSTATIC_WORD, // T_FLOAT = 6, | 1010 NONSTATIC_WORD, // T_FLOAT = 6, |
1014 NONSTATIC_DOUBLE, // T_DOUBLE = 7, | 1011 NONSTATIC_DOUBLE, // T_DOUBLE = 7, |
1015 NONSTATIC_BYTE, // T_BYTE = 8, | 1012 NONSTATIC_BYTE, // T_BYTE = 8, |
1016 NONSTATIC_SHORT, // T_SHORT = 9, | 1013 NONSTATIC_SHORT, // T_SHORT = 9, |
1017 NONSTATIC_WORD, // T_INT = 10, | 1014 NONSTATIC_WORD, // T_INT = 10, |
1018 NONSTATIC_DOUBLE, // T_LONG = 11, | 1015 NONSTATIC_DOUBLE, // T_LONG = 11, |
1019 NONSTATIC_OOP, // T_OBJECT = 12, | 1016 NONSTATIC_OOP, // T_OBJECT = 12, |
1020 NONSTATIC_OOP, // T_ARRAY = 13, | 1017 NONSTATIC_OOP, // T_ARRAY = 13, |
1021 BAD_ALLOCATION_TYPE, // T_VOID = 14, | 1018 BAD_ALLOCATION_TYPE, // T_VOID = 14, |
1022 BAD_ALLOCATION_TYPE, // T_ADDRESS = 15, | 1019 BAD_ALLOCATION_TYPE, // T_ADDRESS = 15, |
1023 BAD_ALLOCATION_TYPE, // T_NARROWOOP= 16, | 1020 BAD_ALLOCATION_TYPE, // T_NARROWOOP = 16, |
1024 BAD_ALLOCATION_TYPE, // T_METADATA = 17, | 1021 BAD_ALLOCATION_TYPE, // T_METADATA = 17, |
1025 BAD_ALLOCATION_TYPE, // T_CONFLICT = 18, | 1022 BAD_ALLOCATION_TYPE, // T_NARROWKLASS = 18, |
1023 BAD_ALLOCATION_TYPE, // T_CONFLICT = 19, | |
1026 BAD_ALLOCATION_TYPE, // 0 | 1024 BAD_ALLOCATION_TYPE, // 0 |
1027 BAD_ALLOCATION_TYPE, // 1 | 1025 BAD_ALLOCATION_TYPE, // 1 |
1028 BAD_ALLOCATION_TYPE, // 2 | 1026 BAD_ALLOCATION_TYPE, // 2 |
1029 BAD_ALLOCATION_TYPE, // 3 | 1027 BAD_ALLOCATION_TYPE, // 3 |
1030 STATIC_BYTE , // T_BOOLEAN = 4, | 1028 STATIC_BYTE , // T_BOOLEAN = 4, |
1031 STATIC_SHORT, // T_CHAR = 5, | 1029 STATIC_SHORT, // T_CHAR = 5, |
1032 STATIC_WORD, // T_FLOAT = 6, | 1030 STATIC_WORD, // T_FLOAT = 6, |
1033 STATIC_DOUBLE, // T_DOUBLE = 7, | 1031 STATIC_DOUBLE, // T_DOUBLE = 7, |
1034 STATIC_BYTE, // T_BYTE = 8, | 1032 STATIC_BYTE, // T_BYTE = 8, |
1035 STATIC_SHORT, // T_SHORT = 9, | 1033 STATIC_SHORT, // T_SHORT = 9, |
1036 STATIC_WORD, // T_INT = 10, | 1034 STATIC_WORD, // T_INT = 10, |
1037 STATIC_DOUBLE, // T_LONG = 11, | 1035 STATIC_DOUBLE, // T_LONG = 11, |
1038 STATIC_OOP, // T_OBJECT = 12, | 1036 STATIC_OOP, // T_OBJECT = 12, |
1039 STATIC_OOP, // T_ARRAY = 13, | 1037 STATIC_OOP, // T_ARRAY = 13, |
1040 BAD_ALLOCATION_TYPE, // T_VOID = 14, | 1038 BAD_ALLOCATION_TYPE, // T_VOID = 14, |
1041 BAD_ALLOCATION_TYPE, // T_ADDRESS = 15, | 1039 BAD_ALLOCATION_TYPE, // T_ADDRESS = 15, |
1042 BAD_ALLOCATION_TYPE, // T_NARROWOOP= 16, | 1040 BAD_ALLOCATION_TYPE, // T_NARROWOOP = 16, |
1043 BAD_ALLOCATION_TYPE, // T_METADATA = 17, | 1041 BAD_ALLOCATION_TYPE, // T_METADATA = 17, |
1044 BAD_ALLOCATION_TYPE, // T_CONFLICT = 18, | 1042 BAD_ALLOCATION_TYPE, // T_NARROWKLASS = 18, |
1043 BAD_ALLOCATION_TYPE, // T_CONFLICT = 19, | |
1045 }; | 1044 }; |
1046 | 1045 |
1047 static FieldAllocationType basic_type_to_atype(bool is_static, BasicType type) { | 1046 static FieldAllocationType basic_type_to_atype(bool is_static, BasicType type) { |
1048 assert(type >= T_BOOLEAN && type < T_VOID, "only allowable values"); | 1047 assert(type >= T_BOOLEAN && type < T_VOID, "only allowable values"); |
1049 FieldAllocationType result = _basic_type_to_atype[type + (is_static ? (T_CONFLICT + 1) : 0)]; | 1048 FieldAllocationType result = _basic_type_to_atype[type + (is_static ? (T_CONFLICT + 1) : 0)]; |
3190 true, | 3189 true, |
3191 CHECK_(nullHandle)); | 3190 CHECK_(nullHandle)); |
3192 | 3191 |
3193 KlassHandle kh (THREAD, k); | 3192 KlassHandle kh (THREAD, k); |
3194 super_klass = instanceKlassHandle(THREAD, kh()); | 3193 super_klass = instanceKlassHandle(THREAD, kh()); |
3195 if (LinkWellKnownClasses) // my super class is well known to me | |
3196 cp->klass_at_put(super_class_index, super_klass()); // eagerly resolve | |
3197 } | 3194 } |
3198 if (super_klass.not_null()) { | 3195 if (super_klass.not_null()) { |
3199 if (super_klass->is_interface()) { | 3196 if (super_klass->is_interface()) { |
3200 ResourceMark rm(THREAD); | 3197 ResourceMark rm(THREAD); |
3201 Exceptions::fthrow( | 3198 Exceptions::fthrow( |
3637 // size is equal to the number of methods in the class. If | 3634 // size is equal to the number of methods in the class. If |
3638 // that changes, then InstanceKlass::idnum_can_increment() | 3635 // that changes, then InstanceKlass::idnum_can_increment() |
3639 // has to be changed accordingly. | 3636 // has to be changed accordingly. |
3640 this_klass->set_initial_method_idnum(methods->length()); | 3637 this_klass->set_initial_method_idnum(methods->length()); |
3641 this_klass->set_name(cp->klass_name_at(this_class_index)); | 3638 this_klass->set_name(cp->klass_name_at(this_class_index)); |
3642 if (LinkWellKnownClasses || is_anonymous()) // I am well known to myself | 3639 if (is_anonymous()) // I am well known to myself |
3643 cp->klass_at_put(this_class_index, this_klass()); // eagerly resolve | 3640 cp->klass_at_put(this_class_index, this_klass()); // eagerly resolve |
3644 | 3641 |
3645 if (fields_annotations != NULL || | 3642 if (fields_annotations != NULL || |
3646 methods_annotations != NULL || | 3643 methods_annotations != NULL || |
3647 methods_parameter_annotations != NULL || | 3644 methods_parameter_annotations != NULL || |