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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
92 | 92 |
93 // Conversion support. | 93 // Conversion support. |
94 static inline StackHandler* FromAddress(Address address); | 94 static inline StackHandler* FromAddress(Address address); |
95 | 95 |
96 private: | 96 private: |
97 DISALLOW_IMPLICIT_CONSTRUCTORS(StackHandler); | 97 DISALLOW_IMPLICIT_CONSTRUCTORS(StackHandler); |
98 }; | 98 }; |
99 | 99 |
100 | 100 |
101 #define STACK_FRAME_TYPE_LIST(V) \ | 101 #define STACK_FRAME_TYPE_LIST(V) \ |
102 V(ENTRY, EntryFrame) \ | 102 V(ENTRY, EntryFrame) \ |
103 V(ENTRY_CONSTRUCT, EntryConstructFrame) \ | 103 V(ENTRY_CONSTRUCT, EntryConstructFrame) \ |
104 V(EXIT, ExitFrame) \ | 104 V(EXIT, ExitFrame) \ |
105 V(JAVA_SCRIPT, JavaScriptFrame) \ | 105 V(JAVA_SCRIPT, JavaScriptFrame) \ |
106 V(OPTIMIZED, OptimizedFrame) \ | 106 V(OPTIMIZED, OptimizedFrame) \ |
107 V(STUB, StubFrame) \ | 107 V(INTERPRETED, InterpretedFrame) \ |
oth
2015/10/14 12:19:32
Not asking for a change, but wonder about Interpre
rmcilroy
2015/10/14 14:18:47
I was trying to keep this similar to OPTIMIZED / O
| |
108 V(STUB, StubFrame) \ | |
108 V(STUB_FAILURE_TRAMPOLINE, StubFailureTrampolineFrame) \ | 109 V(STUB_FAILURE_TRAMPOLINE, StubFailureTrampolineFrame) \ |
109 V(INTERNAL, InternalFrame) \ | 110 V(INTERNAL, InternalFrame) \ |
110 V(CONSTRUCT, ConstructFrame) \ | 111 V(CONSTRUCT, ConstructFrame) \ |
111 V(ARGUMENTS_ADAPTOR, ArgumentsAdaptorFrame) | 112 V(ARGUMENTS_ADAPTOR, ArgumentsAdaptorFrame) |
112 | 113 |
113 | 114 |
114 class StandardFrameConstants : public AllStatic { | 115 class StandardFrameConstants : public AllStatic { |
115 public: | 116 public: |
116 // Fixed part of the frame consists of return address, caller fp, | 117 // Fixed part of the frame consists of return address, caller fp, |
117 // constant pool (if FLAG_enable_embedded_constant_pool), context, and | 118 // constant pool (if FLAG_enable_embedded_constant_pool), context, and |
118 // function. StandardFrame::IterateExpressions assumes that kLastObjectOffset | 119 // function. StandardFrame::IterateExpressions assumes that kLastObjectOffset |
119 // is the last object pointer. | 120 // is the last object pointer. |
120 static const int kCPSlotSize = | 121 static const int kCPSlotSize = |
121 FLAG_enable_embedded_constant_pool ? kPointerSize : 0; | 122 FLAG_enable_embedded_constant_pool ? kPointerSize : 0; |
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
695 protected: | 696 protected: |
696 inline explicit OptimizedFrame(StackFrameIteratorBase* iterator); | 697 inline explicit OptimizedFrame(StackFrameIteratorBase* iterator); |
697 | 698 |
698 private: | 699 private: |
699 friend class StackFrameIteratorBase; | 700 friend class StackFrameIteratorBase; |
700 | 701 |
701 Object* StackSlotAt(int index) const; | 702 Object* StackSlotAt(int index) const; |
702 }; | 703 }; |
703 | 704 |
704 | 705 |
706 class InterpretedFrame : public JavaScriptFrame { | |
707 virtual Type type() const { return INTERPRETED; } | |
708 | |
709 protected: | |
710 inline explicit InterpretedFrame(StackFrameIteratorBase* iterator); | |
711 | |
712 private: | |
713 friend class StackFrameIteratorBase; | |
714 }; | |
715 | |
716 | |
705 // Arguments adaptor frames are automatically inserted below | 717 // Arguments adaptor frames are automatically inserted below |
706 // JavaScript frames when the actual number of parameters does not | 718 // JavaScript frames when the actual number of parameters does not |
707 // match the formal number of parameters. | 719 // match the formal number of parameters. |
708 class ArgumentsAdaptorFrame: public JavaScriptFrame { | 720 class ArgumentsAdaptorFrame: public JavaScriptFrame { |
709 public: | 721 public: |
710 virtual Type type() const { return ARGUMENTS_ADAPTOR; } | 722 virtual Type type() const { return ARGUMENTS_ADAPTOR; } |
711 | 723 |
712 // Determine the code for the frame. | 724 // Determine the code for the frame. |
713 virtual Code* unchecked_code() const; | 725 virtual Code* unchecked_code() const; |
714 | 726 |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
947 | 959 |
948 | 960 |
949 // Reads all frames on the current stack and copies them into the current | 961 // Reads all frames on the current stack and copies them into the current |
950 // zone memory. | 962 // zone memory. |
951 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); | 963 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); |
952 | 964 |
953 } // namespace internal | 965 } // namespace internal |
954 } // namespace v8 | 966 } // namespace v8 |
955 | 967 |
956 #endif // V8_FRAMES_H_ | 968 #endif // V8_FRAMES_H_ |
OLD | NEW |