146 // mismatches |
146 // mismatches |
147 int StackMapFrame::is_assignable_to( |
147 int StackMapFrame::is_assignable_to( |
148 VerificationType* from, VerificationType* to, int32_t len, TRAPS) const { |
148 VerificationType* from, VerificationType* to, int32_t len, TRAPS) const { |
149 int32_t i = 0; |
149 int32_t i = 0; |
150 for (i = 0; i < len; i++) { |
150 for (i = 0; i < len; i++) { |
151 if (!to[i].is_assignable_from(from[i], verifier(), THREAD)) { |
151 if (!to[i].is_assignable_from(from[i], verifier(), false, THREAD)) { |
152 break; |
152 break; |
153 } |
153 } |
154 } |
154 } |
155 return i; |
155 return i; |
156 } |
156 } |
243 "Operand stack underflow"); |
243 "Operand stack underflow"); |
244 return VerificationType::bogus_type(); |
244 return VerificationType::bogus_type(); |
245 } |
245 } |
246 VerificationType top = _stack[--_stack_size]; |
246 VerificationType top = _stack[--_stack_size]; |
247 bool subtype = type.is_assignable_from( |
247 bool subtype = type.is_assignable_from( |
248 top, verifier(), CHECK_(VerificationType::bogus_type())); |
248 top, verifier(), false, CHECK_(VerificationType::bogus_type())); |
249 if (!subtype) { |
249 if (!subtype) { |
250 verifier()->verify_error( |
250 verifier()->verify_error( |
251 ErrorContext::bad_type(_offset, stack_top_ctx(), |
251 ErrorContext::bad_type(_offset, stack_top_ctx(), |
252 TypeOrigin::implicit(type)), |
252 TypeOrigin::implicit(type)), |
253 "Bad type on operand stack"); |
253 "Bad type on operand stack"); |
263 ErrorContext::bad_local_index(_offset, index), |
263 ErrorContext::bad_local_index(_offset, index), |
264 "Local variable table overflow"); |
264 "Local variable table overflow"); |
265 return VerificationType::bogus_type(); |
265 return VerificationType::bogus_type(); |
266 } |
266 } |
267 bool subtype = type.is_assignable_from(_locals[index], |
267 bool subtype = type.is_assignable_from(_locals[index], |
268 verifier(), CHECK_(VerificationType::bogus_type())); |
268 verifier(), false, CHECK_(VerificationType::bogus_type())); |
269 if (!subtype) { |
269 if (!subtype) { |
270 verifier()->verify_error( |
270 verifier()->verify_error( |
271 ErrorContext::bad_type(_offset, |
271 ErrorContext::bad_type(_offset, |
272 TypeOrigin::local(index, this), |
272 TypeOrigin::local(index, this), |
273 TypeOrigin::implicit(type)), |
273 TypeOrigin::implicit(type)), |
286 verifier()->verify_error( |
286 verifier()->verify_error( |
287 ErrorContext::bad_local_index(_offset, index), |
287 ErrorContext::bad_local_index(_offset, index), |
288 "get long/double overflows locals"); |
288 "get long/double overflows locals"); |
289 return; |
289 return; |
290 } |
290 } |
291 bool subtype = type1.is_assignable_from(_locals[index], verifier(), CHECK); |
291 bool subtype = type1.is_assignable_from(_locals[index], verifier(), false, CHECK); |
292 if (!subtype) { |
292 if (!subtype) { |
293 verifier()->verify_error( |
293 verifier()->verify_error( |
294 ErrorContext::bad_type(_offset, |
294 ErrorContext::bad_type(_offset, |
295 TypeOrigin::local(index, this), TypeOrigin::implicit(type1)), |
295 TypeOrigin::local(index, this), TypeOrigin::implicit(type1)), |
296 "Bad local variable type"); |
296 "Bad local variable type"); |
297 } else { |
297 } else { |
298 subtype = type2.is_assignable_from(_locals[index + 1], verifier(), CHECK); |
298 subtype = type2.is_assignable_from(_locals[index + 1], verifier(), false, CHECK); |
299 if (!subtype) { |
299 if (!subtype) { |
300 /* Unreachable? All local store routines convert a split long or double |
300 /* Unreachable? All local store routines convert a split long or double |
301 * into a TOP during the store. So we should never end up seeing an |
301 * into a TOP during the store. So we should never end up seeing an |
302 * orphaned half. */ |
302 * orphaned half. */ |
303 verifier()->verify_error( |
303 verifier()->verify_error( |