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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 int previous_handler_offset) const; | 142 int previous_handler_offset) const; |
143 int Rewind(Isolate* isolate, FixedArray* array, int offset, Address fp); | 143 int Rewind(Isolate* isolate, FixedArray* array, int offset, Address fp); |
144 | 144 |
145 private: | 145 private: |
146 // Accessors. | 146 // Accessors. |
147 inline Kind kind() const; | 147 inline Kind kind() const; |
148 inline unsigned index() const; | 148 inline unsigned index() const; |
149 | 149 |
150 inline Object** context_address() const; | 150 inline Object** context_address() const; |
151 inline Object** code_address() const; | 151 inline Object** code_address() const; |
| 152 inline void SetFp(Address slot, Address fp); |
152 | 153 |
153 DISALLOW_IMPLICIT_CONSTRUCTORS(StackHandler); | 154 DISALLOW_IMPLICIT_CONSTRUCTORS(StackHandler); |
154 }; | 155 }; |
155 | 156 |
156 | 157 |
157 #define STACK_FRAME_TYPE_LIST(V) \ | 158 #define STACK_FRAME_TYPE_LIST(V) \ |
158 V(ENTRY, EntryFrame) \ | 159 V(ENTRY, EntryFrame) \ |
159 V(ENTRY_CONSTRUCT, EntryConstructFrame) \ | 160 V(ENTRY_CONSTRUCT, EntryConstructFrame) \ |
160 V(EXIT, ExitFrame) \ | 161 V(EXIT, ExitFrame) \ |
161 V(JAVA_SCRIPT, JavaScriptFrame) \ | 162 V(JAVA_SCRIPT, JavaScriptFrame) \ |
(...skipping 11 matching lines...) Expand all Loading... |
173 // context and function. | 174 // context and function. |
174 // StandardFrame::IterateExpressions assumes that kContextOffset is the last | 175 // StandardFrame::IterateExpressions assumes that kContextOffset is the last |
175 // object pointer. | 176 // object pointer. |
176 static const int kFixedFrameSize = kPCOnStackSize + kFPOnStackSize + | 177 static const int kFixedFrameSize = kPCOnStackSize + kFPOnStackSize + |
177 2 * kPointerSize; | 178 2 * kPointerSize; |
178 static const int kExpressionsOffset = -3 * kPointerSize; | 179 static const int kExpressionsOffset = -3 * kPointerSize; |
179 static const int kMarkerOffset = -2 * kPointerSize; | 180 static const int kMarkerOffset = -2 * kPointerSize; |
180 static const int kContextOffset = -1 * kPointerSize; | 181 static const int kContextOffset = -1 * kPointerSize; |
181 static const int kCallerFPOffset = 0 * kPointerSize; | 182 static const int kCallerFPOffset = 0 * kPointerSize; |
182 static const int kCallerPCOffset = +1 * kFPOnStackSize; | 183 static const int kCallerPCOffset = +1 * kFPOnStackSize; |
183 static const int kCallerSPOffset = +2 * kPCOnStackSize; | 184 static const int kCallerSPOffset = kCallerPCOffset + 1 * kPCOnStackSize; |
184 }; | 185 }; |
185 | 186 |
186 | 187 |
187 // Abstract base class for all stack frames. | 188 // Abstract base class for all stack frames. |
188 class StackFrame BASE_EMBEDDED { | 189 class StackFrame BASE_EMBEDDED { |
189 public: | 190 public: |
190 #define DECLARE_TYPE(type, ignore) type, | 191 #define DECLARE_TYPE(type, ignore) type, |
191 enum Type { | 192 enum Type { |
192 NONE = 0, | 193 NONE = 0, |
193 STACK_FRAME_TYPE_LIST(DECLARE_TYPE) | 194 STACK_FRAME_TYPE_LIST(DECLARE_TYPE) |
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
925 }; | 926 }; |
926 | 927 |
927 | 928 |
928 // Reads all frames on the current stack and copies them into the current | 929 // Reads all frames on the current stack and copies them into the current |
929 // zone memory. | 930 // zone memory. |
930 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); | 931 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); |
931 | 932 |
932 } } // namespace v8::internal | 933 } } // namespace v8::internal |
933 | 934 |
934 #endif // V8_FRAMES_H_ | 935 #endif // V8_FRAMES_H_ |
OLD | NEW |