From d23eeef3492b53102eb8093524cf37e2b4c296db Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Mon, 18 May 2015 22:31:29 +0100 Subject: Support for inlining methods that call/throw. Mostly fixes here and there to make it working. Change-Id: I1b535e895105d78b65634636d675b818551f783e --- compiler/optimizing/ssa_liveness_analysis.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'compiler/optimizing/ssa_liveness_analysis.h') diff --git a/compiler/optimizing/ssa_liveness_analysis.h b/compiler/optimizing/ssa_liveness_analysis.h index 4b19c5b46a..4cbe29ae42 100644 --- a/compiler/optimizing/ssa_liveness_analysis.h +++ b/compiler/optimizing/ssa_liveness_analysis.h @@ -117,6 +117,7 @@ class UsePosition : public ArenaObject { || user->IsPhi() || (GetPosition() == user->GetLifetimePosition() + 1) || (GetPosition() == user->GetLifetimePosition())); + DCHECK(environment == nullptr || user == nullptr); DCHECK(next_ == nullptr || next->GetPosition() >= GetPosition()); } @@ -128,6 +129,7 @@ class UsePosition : public ArenaObject { void SetNext(UsePosition* next) { next_ = next; } HInstruction* GetUser() const { return user_; } + HEnvironment* GetEnvironment() const { return environment_; } bool GetIsEnvironment() const { return environment_ != nullptr; } bool IsSynthesized() const { return user_ == nullptr; } @@ -280,7 +282,7 @@ class LiveInterval : public ArenaObject { } DCHECK(first_use_->GetPosition() + 1 == position); UsePosition* new_use = new (allocator_) UsePosition( - instruction, environment, input_index, position, cursor->GetNext()); + instruction, nullptr /* environment */, input_index, position, cursor->GetNext()); cursor->SetNext(new_use); if (first_range_->GetEnd() == first_use_->GetPosition()) { first_range_->end_ = position; @@ -290,10 +292,10 @@ class LiveInterval : public ArenaObject { if (is_environment) { first_env_use_ = new (allocator_) UsePosition( - instruction, environment, input_index, position, first_env_use_); + nullptr /* instruction */, environment, input_index, position, first_env_use_); } else { first_use_ = new (allocator_) UsePosition( - instruction, environment, input_index, position, first_use_); + instruction, nullptr /* environment */, input_index, position, first_use_); } if (is_environment && !keep_alive) { -- cgit v1.2.3-59-g8ed1b