| Index: src/lithium-allocator-inl.h
|
| diff --git a/src/lithium-allocator-inl.h b/src/lithium-allocator-inl.h
|
| index 8f660ce0e00373bdd5521b183527e972fc68c75c..1f59cb47783fac74a42fb94502e97eecc352ab54 100644
|
| --- a/src/lithium-allocator-inl.h
|
| +++ b/src/lithium-allocator-inl.h
|
| @@ -99,6 +99,7 @@ bool InputIterator::Done() { return current_ >= limit_; }
|
|
|
| LOperand* InputIterator::Current() {
|
| ASSERT(!Done());
|
| + ASSERT(instr_->InputAt(current_) != NULL);
|
| return instr_->InputAt(current_);
|
| }
|
|
|
| @@ -110,7 +111,9 @@ void InputIterator::Advance() {
|
|
|
|
|
| void InputIterator::SkipUninteresting() {
|
| - while (current_ < limit_ && instr_->InputAt(current_)->IsConstantOperand()) {
|
| + while (current_ < limit_) {
|
| + LOperand* current = instr_->InputAt(current_);
|
| + if (current != NULL && !current->IsConstantOperand()) break;
|
| ++current_;
|
| }
|
| }
|
| @@ -127,9 +130,11 @@ bool UseIterator::Done() {
|
|
|
| LOperand* UseIterator::Current() {
|
| ASSERT(!Done());
|
| - return input_iterator_.Done()
|
| + LOperand* result = input_iterator_.Done()
|
| ? env_iterator_.Current()
|
| : input_iterator_.Current();
|
| + ASSERT(result != NULL);
|
| + return result;
|
| }
|
|
|
|
|
|
|