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