Using ResolveClassAndCheckAccess allows to resolve reference types and check
we have access to these types too. This also prevents from getting unresolved
reference types, which has been observed during deoptimization.
Bug:
13464407
Change-Id: I4c02fdff191c195f34502a4d4a20357419982eb1
// it's effectively considered initialized the instant we reach here (in the sense that we
// can return without doing anything or call virtual methods).
{
- const RegType& reg_type = reg_types_.FromDescriptor(class_loader_->get(), descriptor,
- false);
+ const RegType& reg_type = ResolveClassAndCheckAccess(iterator.GetTypeIdx());
+ if (!reg_type.IsNonZeroReferenceTypes()) {
+ DCHECK(HasFailures());
+ return false;
+ }
reg_line->SetRegisterType(arg_start + cur_arg, reg_type);
}
break;