summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
author Santiago Aboy Solanes <solanes@google.com> 2022-02-16 17:56:34 +0000
committer Santiago Aboy Solanes <solanes@google.com> 2022-02-25 08:18:14 +0000
commit0805e9083aa761094575cd3c4d1eff41bbcf5b74 (patch)
treedc28ccf28643ec34dddcfb9446cfebc5029421d4 /compiler
parent713a041090d2cffde0f53ad1652652057adb5196 (diff)
Add (D)CHECK_IMPLIES to ART logging
Adds an _IMPLIES macro which is equivalent to checking a => b. This CL includes an example of how it could be useful to aid readability. Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b Change-Id: If36ccf2a1d10ebd0b0c9f9635020dc78f5ae94ae
Diffstat (limited to 'compiler')
-rw-r--r--compiler/optimizing/code_generator_x86_64.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/optimizing/code_generator_x86_64.cc b/compiler/optimizing/code_generator_x86_64.cc
index 1016652478..ff4ab59760 100644
--- a/compiler/optimizing/code_generator_x86_64.cc
+++ b/compiler/optimizing/code_generator_x86_64.cc
@@ -5195,8 +5195,7 @@ void InstructionCodeGeneratorX86_64::HandleFieldSet(HInstruction* instruction,
if (byte_swap) {
v = BSWAP(v);
}
- // `field_type == DataType::Type::kReference` implies `v == 0`.
- DCHECK((field_type != DataType::Type::kReference) || (v == 0));
+ DCHECK_IMPLIES(field_type == DataType::Type::kReference, v == 0);
// Note: if heap poisoning is enabled, no need to poison
// (negate) `v` if it is a reference, as it would be null.
__ movl(field_addr, Immediate(v));