From d6138ef1ea13d07ae555542f8898b30d89e9ac9a Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Wed, 18 Feb 2015 14:48:53 +0000 Subject: Ensure the graph is correctly typed. We used to be forgiving because of HIntConstant(0) also being used for null. We now create a special HNullConstant for such uses. Also, we need to run the dead phi elimination twice during ssa building to ensure the correctness. Change-Id: If479efa3680d3358800aebb1cca692fa2d94f6e5 --- compiler/optimizing/code_generator.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'compiler/optimizing/code_generator.cc') diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc index bf3ed14b48..5b395c8eeb 100644 --- a/compiler/optimizing/code_generator.cc +++ b/compiler/optimizing/code_generator.cc @@ -636,6 +636,8 @@ void CodeGenerator::RecordPcInfo(HInstruction* instruction, uint32_t dex_pc) { } else if (current->IsIntConstant()) { int32_t value = current->AsIntConstant()->GetValue(); stack_map_stream_.AddDexRegisterEntry(DexRegisterMap::kConstant, value); + } else if (current->IsNullConstant()) { + stack_map_stream_.AddDexRegisterEntry(DexRegisterMap::kConstant, 0); } else { DCHECK(current->IsFloatConstant()); int32_t value = bit_cast(current->AsFloatConstant()->GetValue()); -- cgit v1.2.3-59-g8ed1b