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 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
836 ActiveCountMaintainer maintainer_; | 836 ActiveCountMaintainer maintainer_; |
837 StackAddressValidator stack_validator_; | 837 StackAddressValidator stack_validator_; |
838 const bool is_valid_top_; | 838 const bool is_valid_top_; |
839 const bool is_valid_fp_; | 839 const bool is_valid_fp_; |
840 const bool is_working_iterator_; | 840 const bool is_working_iterator_; |
841 bool iteration_done_; | 841 bool iteration_done_; |
842 StackFrameIterator iterator_; | 842 StackFrameIterator iterator_; |
843 }; | 843 }; |
844 | 844 |
845 | 845 |
846 #ifdef ENABLE_LOGGING_AND_PROFILING | |
847 typedef JavaScriptFrameIteratorTemp<SafeStackFrameIterator> | 846 typedef JavaScriptFrameIteratorTemp<SafeStackFrameIterator> |
848 SafeJavaScriptFrameIterator; | 847 SafeJavaScriptFrameIterator; |
849 | 848 |
850 | 849 |
851 class SafeStackTraceFrameIterator: public SafeJavaScriptFrameIterator { | 850 class SafeStackTraceFrameIterator: public SafeJavaScriptFrameIterator { |
852 public: | 851 public: |
853 explicit SafeStackTraceFrameIterator(Isolate* isolate, | 852 explicit SafeStackTraceFrameIterator(Isolate* isolate, |
854 Address fp, Address sp, | 853 Address fp, Address sp, |
855 Address low_bound, Address high_bound); | 854 Address low_bound, Address high_bound); |
856 void Advance(); | 855 void Advance(); |
857 }; | 856 }; |
858 #endif | |
859 | 857 |
860 | 858 |
861 class StackFrameLocator BASE_EMBEDDED { | 859 class StackFrameLocator BASE_EMBEDDED { |
862 public: | 860 public: |
863 // Find the nth JavaScript frame on the stack. The caller must | 861 // Find the nth JavaScript frame on the stack. The caller must |
864 // guarantee that such a frame exists. | 862 // guarantee that such a frame exists. |
865 JavaScriptFrame* FindJavaScriptFrame(int n); | 863 JavaScriptFrame* FindJavaScriptFrame(int n); |
866 | 864 |
867 private: | 865 private: |
868 StackFrameIterator iterator_; | 866 StackFrameIterator iterator_; |
869 }; | 867 }; |
870 | 868 |
871 | 869 |
872 // Reads all frames on the current stack and copies them into the current | 870 // Reads all frames on the current stack and copies them into the current |
873 // zone memory. | 871 // zone memory. |
874 Vector<StackFrame*> CreateStackMap(); | 872 Vector<StackFrame*> CreateStackMap(); |
875 | 873 |
876 } } // namespace v8::internal | 874 } } // namespace v8::internal |
877 | 875 |
878 #endif // V8_FRAMES_H_ | 876 #endif // V8_FRAMES_H_ |
OLD | NEW |