OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 StackFrame* frame() const { | 600 StackFrame* frame() const { |
601 ASSERT(is_working_iterator_); | 601 ASSERT(is_working_iterator_); |
602 return iterator_.frame(); | 602 return iterator_.frame(); |
603 } | 603 } |
604 | 604 |
605 bool done() const { return iteration_done_ ? true : iterator_.done(); } | 605 bool done() const { return iteration_done_ ? true : iterator_.done(); } |
606 | 606 |
607 void Advance(); | 607 void Advance(); |
608 void Reset(); | 608 void Reset(); |
609 | 609 |
610 private: | |
611 static bool IsWithinBounds( | 610 static bool IsWithinBounds( |
612 Address low_bound, Address high_bound, Address addr) { | 611 Address low_bound, Address high_bound, Address addr) { |
613 return low_bound <= addr && addr <= high_bound; | 612 return low_bound <= addr && addr <= high_bound; |
614 } | 613 } |
| 614 |
| 615 private: |
615 bool IsValidStackAddress(Address addr) const { | 616 bool IsValidStackAddress(Address addr) const { |
616 return IsWithinBounds(low_bound_, high_bound_, addr); | 617 return IsWithinBounds(low_bound_, high_bound_, addr); |
617 } | 618 } |
618 bool CanIterateHandles(StackFrame* frame, StackHandler* handler); | 619 bool CanIterateHandles(StackFrame* frame, StackHandler* handler); |
619 bool IsValidFrame(StackFrame* frame) const; | 620 bool IsValidFrame(StackFrame* frame) const; |
620 bool IsValidCaller(StackFrame* frame); | 621 bool IsValidCaller(StackFrame* frame); |
621 | 622 |
622 Address low_bound_; | 623 Address low_bound_; |
623 Address high_bound_; | 624 Address high_bound_; |
624 const bool is_valid_top_; | 625 const bool is_valid_top_; |
(...skipping 25 matching lines...) Expand all Loading... |
650 JavaScriptFrame* FindJavaScriptFrame(int n); | 651 JavaScriptFrame* FindJavaScriptFrame(int n); |
651 | 652 |
652 private: | 653 private: |
653 StackFrameIterator iterator_; | 654 StackFrameIterator iterator_; |
654 }; | 655 }; |
655 | 656 |
656 | 657 |
657 } } // namespace v8::internal | 658 } } // namespace v8::internal |
658 | 659 |
659 #endif // V8_FRAMES_H_ | 660 #endif // V8_FRAMES_H_ |
OLD | NEW |