diff options
Diffstat (limited to 'compiler/optimizing/intrinsics.cc')
-rw-r--r-- | compiler/optimizing/intrinsics.cc | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/compiler/optimizing/intrinsics.cc b/compiler/optimizing/intrinsics.cc index 774deec438..f832d9c8bf 100644 --- a/compiler/optimizing/intrinsics.cc +++ b/compiler/optimizing/intrinsics.cc @@ -151,7 +151,8 @@ static bool CanReferenceBootImageObjects(HInvoke* invoke, const CompilerOptions& // for AOT. This should cover both the testing config (non-PIC boot image) and codegens that // reject PC-relative load kinds and fall back to the runtime call. if (compiler_options.IsAotCompiler() && - !invoke->AsInvokeStaticOrDirect()->HasPcRelativeMethodLoadKind()) { + // TODO: Remove "OrNull". + !invoke->AsInvokeStaticOrDirectOrNull()->HasPcRelativeMethodLoadKind()) { return false; } if (!compiler_options.IsBootImage() && @@ -209,7 +210,8 @@ void IntrinsicVisitor::ComputeIntegerValueOfLocations(HInvoke* invoke, } } if (input->IsIntConstant()) { - int32_t value = input->AsIntConstant()->GetValue(); + // TODO: Remove "OrNull". + int32_t value = input->AsIntConstantOrNull()->GetValue(); if (static_cast<uint32_t>(value) - static_cast<uint32_t>(low) < static_cast<uint32_t>(high - low + 1)) { // No call, we shall use direct pointer to the Integer object. @@ -234,7 +236,8 @@ void IntrinsicVisitor::ComputeIntegerValueOfLocations(HInvoke* invoke, DCHECK(compiler_options.IsAotCompiler()); DCHECK(CheckIntegerCache(self, runtime->GetClassLinker(), boot_image_live_objects, cache)); if (input->IsIntConstant()) { - int32_t value = input->AsIntConstant()->GetValue(); + // TODO: Remove "OrNull". + int32_t value = input->AsIntConstantOrNull()->GetValue(); // Retrieve the `value` from the lowest cached Integer. ObjPtr<mirror::Object> low_integer = IntrinsicObjects::GetIntegerValueOfObject(boot_image_live_objects, 0u); @@ -308,7 +311,8 @@ IntrinsicVisitor::IntegerValueOfInfo IntrinsicVisitor::ComputeIntegerValueOfInfo info.length = dchecked_integral_cast<uint32_t>(high - info.low + 1); if (invoke->InputAt(0)->IsIntConstant()) { - int32_t input_value = invoke->InputAt(0)->AsIntConstant()->GetValue(); + // TODO: Remove "OrNull". + int32_t input_value = invoke->InputAt(0)->AsIntConstantOrNull()->GetValue(); uint32_t index = static_cast<uint32_t>(input_value) - static_cast<uint32_t>(info.low); if (index < static_cast<uint32_t>(info.length)) { info.value_boot_image_reference = IntrinsicObjects::EncodePatch( @@ -343,7 +347,8 @@ IntrinsicVisitor::IntegerValueOfInfo IntrinsicVisitor::ComputeIntegerValueOfInfo IntrinsicObjects::GetIntegerValueOfCache(boot_image_live_objects)->GetLength()); if (invoke->InputAt(0)->IsIntConstant()) { - int32_t input_value = invoke->InputAt(0)->AsIntConstant()->GetValue(); + // TODO: Remove "OrNull". + int32_t input_value = invoke->InputAt(0)->AsIntConstantOrNull()->GetValue(); uint32_t index = static_cast<uint32_t>(input_value) - static_cast<uint32_t>(info.low); if (index < static_cast<uint32_t>(info.length)) { ObjPtr<mirror::Object> integer = |