| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_FRAMES_H_ | 5 #ifndef V8_FRAMES_H_ |
| 6 #define V8_FRAMES_H_ | 6 #define V8_FRAMES_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/handles.h" | 9 #include "src/handles.h" |
| 10 #include "src/safepoint-table.h" | 10 #include "src/safepoint-table.h" |
| (...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 851 }; | 851 }; |
| 852 | 852 |
| 853 #undef FRAME_SUMMARY_FIELD | 853 #undef FRAME_SUMMARY_FIELD |
| 854 #define FRAME_SUMMARY_CONS(kind, type, field, desc) \ | 854 #define FRAME_SUMMARY_CONS(kind, type, field, desc) \ |
| 855 FrameSummary(type summ) : field(summ) {} // NOLINT | 855 FrameSummary(type summ) : field(summ) {} // NOLINT |
| 856 FRAME_SUMMARY_VARIANTS(FRAME_SUMMARY_CONS) | 856 FRAME_SUMMARY_VARIANTS(FRAME_SUMMARY_CONS) |
| 857 #undef FRAME_SUMMARY_CONS | 857 #undef FRAME_SUMMARY_CONS |
| 858 | 858 |
| 859 ~FrameSummary(); | 859 ~FrameSummary(); |
| 860 | 860 |
| 861 static inline FrameSummary GetFirst(const StandardFrame* frame) { | 861 static FrameSummary GetTop(const StandardFrame* frame); |
| 862 return Get(frame, 0); | 862 static FrameSummary GetBottom(const StandardFrame* frame); |
| 863 } | 863 static FrameSummary GetSingle(const StandardFrame* frame); |
| 864 static FrameSummary Get(const StandardFrame* frame, int index); | 864 static FrameSummary Get(const StandardFrame* frame, int index); |
| 865 static FrameSummary GetSingle(const StandardFrame* frame); | |
| 866 | 865 |
| 867 // Dispatched accessors. | 866 // Dispatched accessors. |
| 868 Handle<Object> receiver() const; | 867 Handle<Object> receiver() const; |
| 869 int code_offset() const; | 868 int code_offset() const; |
| 870 bool is_constructor() const; | 869 bool is_constructor() const; |
| 871 bool is_subject_to_debugging() const; | 870 bool is_subject_to_debugging() const; |
| 872 Handle<Object> script() const; | 871 Handle<Object> script() const; |
| 873 int SourcePosition() const; | 872 int SourcePosition() const; |
| 874 int SourceStatementPosition() const; | 873 int SourceStatementPosition() const; |
| 875 Handle<String> FunctionName() const; | 874 Handle<String> FunctionName() const; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 917 // Access the parameters. | 916 // Access the parameters. |
| 918 virtual Object* GetParameter(int index) const; | 917 virtual Object* GetParameter(int index) const; |
| 919 virtual int ComputeParametersCount() const; | 918 virtual int ComputeParametersCount() const; |
| 920 | 919 |
| 921 void SetCallerFp(Address caller_fp) override; | 920 void SetCallerFp(Address caller_fp) override; |
| 922 | 921 |
| 923 // Check if this frame is a constructor frame invoked through 'new'. | 922 // Check if this frame is a constructor frame invoked through 'new'. |
| 924 virtual bool IsConstructor() const; | 923 virtual bool IsConstructor() const; |
| 925 | 924 |
| 926 // Build a list with summaries for this frame including all inlined frames. | 925 // Build a list with summaries for this frame including all inlined frames. |
| 926 // The functions are ordered bottom-to-top (i.e. summaries.last() is the |
| 927 // top-most activation; caller comes before callee). |
| 927 virtual void Summarize( | 928 virtual void Summarize( |
| 928 List<FrameSummary>* frames, | 929 List<FrameSummary>* frames, |
| 929 FrameSummary::Mode mode = FrameSummary::kExactSummary) const; | 930 FrameSummary::Mode mode = FrameSummary::kExactSummary) const; |
| 930 | 931 |
| 931 static StandardFrame* cast(StackFrame* frame) { | 932 static StandardFrame* cast(StackFrame* frame) { |
| 932 DCHECK(frame->is_standard()); | 933 DCHECK(frame->is_standard()); |
| 933 return static_cast<StandardFrame*>(frame); | 934 return static_cast<StandardFrame*>(frame); |
| 934 } | 935 } |
| 935 | 936 |
| 936 protected: | 937 protected: |
| (...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1548 | 1549 |
| 1549 | 1550 |
| 1550 // Reads all frames on the current stack and copies them into the current | 1551 // Reads all frames on the current stack and copies them into the current |
| 1551 // zone memory. | 1552 // zone memory. |
| 1552 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); | 1553 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); |
| 1553 | 1554 |
| 1554 } // namespace internal | 1555 } // namespace internal |
| 1555 } // namespace v8 | 1556 } // namespace v8 |
| 1556 | 1557 |
| 1557 #endif // V8_FRAMES_H_ | 1558 #endif // V8_FRAMES_H_ |
| OLD | NEW |