Update runtime/ implications to use (D)CHECK_IMPLIES
Follow-up to aosp/1988868 in which we added the (D)CHECK_IMPLIES
macro. This CL uses it on compiler/ occurrences found by a regex.
Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b
Change-Id: Id4ee45b41bad85a1f0d98c1e88af6baa3e34a662
diff --git a/runtime/art_method-inl.h b/runtime/art_method-inl.h
index c86e248..5d90b9c 100644
--- a/runtime/art_method-inl.h
+++ b/runtime/art_method-inl.h
@@ -154,14 +154,14 @@
inline bool ArtMethod::IsResolutionMethod() {
bool result = this == Runtime::Current()->GetResolutionMethod();
// Check that if we do think it is phony it looks like the resolution method.
- DCHECK(!result || IsRuntimeMethod());
+ DCHECK_IMPLIES(result, IsRuntimeMethod());
return result;
}
inline bool ArtMethod::IsImtUnimplementedMethod() {
bool result = this == Runtime::Current()->GetImtUnimplementedMethod();
// Check that if we do think it is phony it looks like the imt unimplemented method.
- DCHECK(!result || IsRuntimeMethod());
+ DCHECK_IMPLIES(result, IsRuntimeMethod());
return result;
}
@@ -357,8 +357,8 @@
ArtMethod* interface_method = GetInterfaceMethodForProxyUnchecked(pointer_size);
// We can check that the proxy class implements the interface only if the proxy class
// is resolved, otherwise the interface table is not yet initialized.
- DCHECK(!GetDeclaringClass()->IsResolved() ||
- interface_method->GetDeclaringClass()->IsAssignableFrom(GetDeclaringClass()));
+ DCHECK_IMPLIES(GetDeclaringClass()->IsResolved(),
+ interface_method->GetDeclaringClass()->IsAssignableFrom(GetDeclaringClass()));
return interface_method;
}