From e05bc3e1d03e8cba0c16a1b738591a2e972235b6 Mon Sep 17 00:00:00 2001 From: Santiago Aboy Solanes Date: Mon, 20 Feb 2023 14:26:23 +0000 Subject: Set more RTI only if they are valid Follow-up to aosp/2442280. We haven't seen crashes with these ones, but we can't guarantee that the RTI will be valid in these code paths. Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b Change-Id: I80da85a6549ba0275a80027016363e0cf9fb8045 --- compiler/optimizing/nodes.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'compiler/optimizing/nodes.h') diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index 58ce9cec70..5854fa2fa5 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -2377,7 +2377,10 @@ class HInstruction : public ArenaObject { return GetType() == DataType::Type::kReference; } + // Sets the ReferenceTypeInfo. The RTI must be valid. void SetReferenceTypeInfo(ReferenceTypeInfo rti); + // Same as above, but we only set it if it's valid. Otherwise, we don't change the current RTI. + void SetReferenceTypeInfoIfValid(ReferenceTypeInfo rti); ReferenceTypeInfo GetReferenceTypeInfo() const { DCHECK_EQ(GetType(), DataType::Type::kReference); -- cgit v1.2.3-59-g8ed1b