summaryrefslogtreecommitdiff
path: root/compiler/optimizing/code_generator.h
diff options
context:
space:
mode:
author David Brazdil <dbrazdil@google.com> 2015-03-18 09:15:21 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-03-18 09:15:21 +0000
commitd6f00810e2419489f526e4f0c94cb13318a365fd (patch)
tree34ce88146d5c2ed27676e4780181ed395f9a9129 /compiler/optimizing/code_generator.h
parent696005b00575fa53c91f3baabd4e85d543df4df8 (diff)
parent522e2241f5b5f331d0aa2f8508f4c97973f7f012 (diff)
Merge "ART: Fix condition for StoreNeedsWriteBarrier"
Diffstat (limited to 'compiler/optimizing/code_generator.h')
-rw-r--r--compiler/optimizing/code_generator.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/compiler/optimizing/code_generator.h b/compiler/optimizing/code_generator.h
index 667f686059..ecaa6f0123 100644
--- a/compiler/optimizing/code_generator.h
+++ b/compiler/optimizing/code_generator.h
@@ -246,12 +246,9 @@ class CodeGenerator {
void EmitParallelMoves(Location from1, Location to1, Location from2, Location to2);
static bool StoreNeedsWriteBarrier(Primitive::Type type, HInstruction* value) {
- if (kIsDebugBuild) {
- if (type == Primitive::kPrimNot && value->IsIntConstant()) {
- CHECK_EQ(value->AsIntConstant()->GetValue(), 0);
- }
- }
- return type == Primitive::kPrimNot && !value->IsIntConstant();
+ // Check that null value is not represented as an integer constant.
+ DCHECK(type != Primitive::kPrimNot || !value->IsIntConstant());
+ return type == Primitive::kPrimNot && !value->IsNullConstant();
}
void AddAllocatedRegister(Location location) {