OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 : env_(env), | 574 : env_(env), |
575 limit_(env != NULL ? env->values()->length() : 0), | 575 limit_(env != NULL ? env->values()->length() : 0), |
576 current_(0) { | 576 current_(0) { |
577 SkipUninteresting(); | 577 SkipUninteresting(); |
578 } | 578 } |
579 | 579 |
580 bool Done() { return current_ >= limit_; } | 580 bool Done() { return current_ >= limit_; } |
581 | 581 |
582 LOperand* Current() { | 582 LOperand* Current() { |
583 ASSERT(!Done()); | 583 ASSERT(!Done()); |
| 584 ASSERT(env_->values()->at(current_) != NULL); |
584 return env_->values()->at(current_); | 585 return env_->values()->at(current_); |
585 } | 586 } |
586 | 587 |
587 void Advance() { | 588 void Advance() { |
588 ASSERT(!Done()); | 589 ASSERT(!Done()); |
589 ++current_; | 590 ++current_; |
590 SkipUninteresting(); | 591 SkipUninteresting(); |
591 } | 592 } |
592 | 593 |
593 LEnvironment* env() { return env_; } | 594 LEnvironment* env() { return env_; } |
(...skipping 21 matching lines...) Expand all Loading... |
615 public: | 616 public: |
616 explicit DeepIterator(LEnvironment* env) | 617 explicit DeepIterator(LEnvironment* env) |
617 : current_iterator_(env) { | 618 : current_iterator_(env) { |
618 SkipUninteresting(); | 619 SkipUninteresting(); |
619 } | 620 } |
620 | 621 |
621 bool Done() { return current_iterator_.Done(); } | 622 bool Done() { return current_iterator_.Done(); } |
622 | 623 |
623 LOperand* Current() { | 624 LOperand* Current() { |
624 ASSERT(!current_iterator_.Done()); | 625 ASSERT(!current_iterator_.Done()); |
| 626 ASSERT(current_iterator_.Current() != NULL); |
625 return current_iterator_.Current(); | 627 return current_iterator_.Current(); |
626 } | 628 } |
627 | 629 |
628 void Advance() { | 630 void Advance() { |
629 current_iterator_.Advance(); | 631 current_iterator_.Advance(); |
630 SkipUninteresting(); | 632 SkipUninteresting(); |
631 } | 633 } |
632 | 634 |
633 private: | 635 private: |
634 void SkipUninteresting() { | 636 void SkipUninteresting() { |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 ZoneList<Handle<JSFunction> > inlined_closures_; | 705 ZoneList<Handle<JSFunction> > inlined_closures_; |
704 }; | 706 }; |
705 | 707 |
706 | 708 |
707 int ElementsKindToShiftSize(ElementsKind elements_kind); | 709 int ElementsKindToShiftSize(ElementsKind elements_kind); |
708 | 710 |
709 | 711 |
710 } } // namespace v8::internal | 712 } } // namespace v8::internal |
711 | 713 |
712 #endif // V8_LITHIUM_H_ | 714 #endif // V8_LITHIUM_H_ |
OLD | NEW |