diff options
author | Vladimir Marko <vmarko@google.com> | 2020-01-20 13:05:55 +0000 |
---|---|---|
committer | Vladimir Marko <vmarko@google.com> | 2020-01-20 15:27:36 +0000 |
commit | 6a67bea2203783db7569cd99cc86e2b63f5e28a7 (patch) | |
tree | 5634c31c3da4eb68294015909bf91b7dfd107087 /compiler/optimizing/instruction_builder.cc | |
parent | 4d7b689fe667a65138eceb311767a3d624fb0e4b (diff) |
Update InstructionBuilder's IsInBootImage for boot image extension.
For boot image extension, check both the class being in the
boot image space and the descriptor being in image classes.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Test: aosp_taimen-userdebug boots.
Bug: 119800099
Change-Id: I56f81d7b7aed20f5ee5c4ffd4d2e01aacd42d243
Diffstat (limited to 'compiler/optimizing/instruction_builder.cc')
-rw-r--r-- | compiler/optimizing/instruction_builder.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/optimizing/instruction_builder.cc b/compiler/optimizing/instruction_builder.cc index e7f0872c65..4ae94b7b3f 100644 --- a/compiler/optimizing/instruction_builder.cc +++ b/compiler/optimizing/instruction_builder.cc @@ -1140,12 +1140,15 @@ void HInstructionBuilder::BuildConstructorFenceForAllocation(HInstruction* alloc static bool IsInBootImage(ObjPtr<mirror::Class> cls, const CompilerOptions& compiler_options) REQUIRES_SHARED(Locks::mutator_lock_) { - if (compiler_options.IsBootImage()) { + if (Runtime::Current()->GetHeap()->ObjectIsInBootImageSpace(cls)) { + return true; + } + if (compiler_options.IsBootImage() || compiler_options.IsBootImageExtension()) { std::string temp; const char* descriptor = cls->GetDescriptor(&temp); return compiler_options.IsImageClass(descriptor); } else { - return Runtime::Current()->GetHeap()->FindSpaceFromObject(cls, false)->IsImageSpace(); + return false; } } |