From 0a23d74dc2751440822960eab218be4cb8843647 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Thu, 7 May 2015 11:57:35 +0100 Subject: Add a parent environment to HEnvironment. This code has no functionality change. It adds a placeholder for chaining inlined frames. Change-Id: I5ec57335af76ee406052345b947aad98a6a4423a --- compiler/optimizing/code_generator.cc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'compiler/optimizing/code_generator.cc') diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc index cfe121e0ec..0e776b31f7 100644 --- a/compiler/optimizing/code_generator.cc +++ b/compiler/optimizing/code_generator.cc @@ -100,11 +100,11 @@ static bool CheckTypeConsistency(HInstruction* instruction) { for (size_t i = 0; i < instruction->EnvironmentSize(); ++i) { if (environment->GetInstructionAt(i) != nullptr) { Primitive::Type type = environment->GetInstructionAt(i)->GetType(); - DCHECK(CheckType(type, locations->GetEnvironmentAt(i))) - << type << " " << locations->GetEnvironmentAt(i); + DCHECK(CheckType(type, environment->GetLocationAt(i))) + << type << " " << environment->GetLocationAt(i); } else { - DCHECK(locations->GetEnvironmentAt(i).IsInvalid()) - << locations->GetEnvironmentAt(i); + DCHECK(environment->GetLocationAt(i).IsInvalid()) + << environment->GetLocationAt(i); } } return true; @@ -680,6 +680,11 @@ void CodeGenerator::RecordPcInfo(HInstruction* instruction, locations->GetStackMask(), environment_size, inlining_depth); + if (environment != nullptr) { + // TODO: Handle parent environment. + DCHECK(environment->GetParent() == nullptr); + DCHECK_EQ(environment->GetDexPc(), dex_pc); + } // Walk over the environment, and record the location of dex registers. for (size_t i = 0; i < environment_size; ++i) { @@ -689,7 +694,7 @@ void CodeGenerator::RecordPcInfo(HInstruction* instruction, continue; } - Location location = locations->GetEnvironmentAt(i); + Location location = environment->GetLocationAt(i); switch (location.GetKind()) { case Location::kConstant: { DCHECK_EQ(current, location.GetConstant()); -- cgit v1.2.3-59-g8ed1b