summaryrefslogtreecommitdiff
path: root/compiler/optimizing/code_generator.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2015-05-07 11:57:35 +0100
committer Nicolas Geoffray <ngeoffray@google.com> 2015-05-11 14:17:22 +0100
commit0a23d74dc2751440822960eab218be4cb8843647 (patch)
tree39d69de5d812826c4065d0acd38a58cd983f21f0 /compiler/optimizing/code_generator.cc
parentcdeb0b5fede4c06488f43a212591e661d946bc78 (diff)
Add a parent environment to HEnvironment.
This code has no functionality change. It adds a placeholder for chaining inlined frames. Change-Id: I5ec57335af76ee406052345b947aad98a6a4423a
Diffstat (limited to 'compiler/optimizing/code_generator.cc')
-rw-r--r--compiler/optimizing/code_generator.cc15
1 files changed, 10 insertions, 5 deletions
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());