103 // delayed until runtime.
104 return true;
105 }
106
107 return resolve_and_check_assignability(klass, name(), from.name(),
108 from_field_is_protected, from.is_array(), from.is_object(), THREAD);
109 } else if (is_array() && from.is_array()) {
110 VerificationType comp_this = get_component(context, CHECK_false);
111 VerificationType comp_from = from.get_component(context, CHECK_false);
112 if (!comp_this.is_bogus() && !comp_from.is_bogus()) {
113 return comp_this.is_component_assignable_from(comp_from, context,
114 from_field_is_protected, CHECK_false);
115 }
116 }
117 return false;
118 }
119
120 VerificationType VerificationType::get_component(ClassVerifier *context, TRAPS) const {
121 assert(is_array() && name()->utf8_length() >= 2, "Must be a valid array");
122 Symbol* component;
123 switch (name()->byte_at(1)) {
124 case 'Z': return VerificationType(Boolean);
125 case 'B': return VerificationType(Byte);
126 case 'C': return VerificationType(Char);
127 case 'S': return VerificationType(Short);
128 case 'I': return VerificationType(Integer);
129 case 'J': return VerificationType(Long);
130 case 'F': return VerificationType(Float);
131 case 'D': return VerificationType(Double);
132 case '[':
133 component = context->create_temporary_symbol(
134 name(), 1, name()->utf8_length(),
135 CHECK_(VerificationType::bogus_type()));
136 return VerificationType::reference_type(component);
137 case 'L':
138 component = context->create_temporary_symbol(
139 name(), 2, name()->utf8_length() - 1,
140 CHECK_(VerificationType::bogus_type()));
141 return VerificationType::reference_type(component);
142 default:
143 // Met an invalid type signature, e.g. [X
|
103 // delayed until runtime.
104 return true;
105 }
106
107 return resolve_and_check_assignability(klass, name(), from.name(),
108 from_field_is_protected, from.is_array(), from.is_object(), THREAD);
109 } else if (is_array() && from.is_array()) {
110 VerificationType comp_this = get_component(context, CHECK_false);
111 VerificationType comp_from = from.get_component(context, CHECK_false);
112 if (!comp_this.is_bogus() && !comp_from.is_bogus()) {
113 return comp_this.is_component_assignable_from(comp_from, context,
114 from_field_is_protected, CHECK_false);
115 }
116 }
117 return false;
118 }
119
120 VerificationType VerificationType::get_component(ClassVerifier *context, TRAPS) const {
121 assert(is_array() && name()->utf8_length() >= 2, "Must be a valid array");
122 Symbol* component;
123 switch (name()->char_at(1)) {
124 case 'Z': return VerificationType(Boolean);
125 case 'B': return VerificationType(Byte);
126 case 'C': return VerificationType(Char);
127 case 'S': return VerificationType(Short);
128 case 'I': return VerificationType(Integer);
129 case 'J': return VerificationType(Long);
130 case 'F': return VerificationType(Float);
131 case 'D': return VerificationType(Double);
132 case '[':
133 component = context->create_temporary_symbol(
134 name(), 1, name()->utf8_length(),
135 CHECK_(VerificationType::bogus_type()));
136 return VerificationType::reference_type(component);
137 case 'L':
138 component = context->create_temporary_symbol(
139 name(), 2, name()->utf8_length() - 1,
140 CHECK_(VerificationType::bogus_type()));
141 return VerificationType::reference_type(component);
142 default:
143 // Met an invalid type signature, e.g. [X
|