summaryrefslogtreecommitdiff
path: root/compiler/optimizing/nodes.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2024-10-09 17:17:47 +0200
committer VladimĂ­r Marko <vmarko@google.com> 2024-10-11 09:13:41 +0000
commit6b16dc2993cb3fcf4ad158d854240b2fc4f10778 (patch)
treee8b0460246938a9e558bb3af18c9a493ef5b4f86 /compiler/optimizing/nodes.cc
parent38da15271f13eb3a06c0b3fe267158ba564ae667 (diff)
Refactor `ReferenceTypeInfo` out of `nodes.{h,cc}`.
Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Change-Id: I0c2f310606bb03f264038534c23f15dd0fee5662
Diffstat (limited to 'compiler/optimizing/nodes.cc')
-rw-r--r--compiler/optimizing/nodes.cc22
1 files changed, 0 insertions, 22 deletions
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc
index 79e61d0285..1db4f26920 100644
--- a/compiler/optimizing/nodes.cc
+++ b/compiler/optimizing/nodes.cc
@@ -3135,28 +3135,6 @@ void HBoundType::SetUpperBound(const ReferenceTypeInfo& upper_bound, bool can_be
SetPackedFlag<kFlagUpperCanBeNull>(can_be_null);
}
-ReferenceTypeInfo ReferenceTypeInfo::Create(TypeHandle type_handle, bool is_exact) {
- if (kIsDebugBuild) {
- ScopedObjectAccess soa(Thread::Current());
- DCHECK(IsValidHandle(type_handle));
- if (!is_exact) {
- DCHECK(!type_handle->CannotBeAssignedFromOtherTypes())
- << "Callers of ReferenceTypeInfo::Create should ensure is_exact is properly computed";
- }
- }
- return ReferenceTypeInfo(type_handle, is_exact);
-}
-
-std::ostream& operator<<(std::ostream& os, const ReferenceTypeInfo& rhs) {
- ScopedObjectAccess soa(Thread::Current());
- os << "["
- << " is_valid=" << rhs.IsValid()
- << " type=" << (!rhs.IsValid() ? "?" : mirror::Class::PrettyClass(rhs.GetTypeHandle().Get()))
- << " is_exact=" << rhs.IsExact()
- << " ]";
- return os;
-}
-
bool HInstruction::HasAnyEnvironmentUseBefore(HInstruction* other) {
// For now, assume that instructions in different blocks may use the
// environment.