| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 | 85 |
| 86 | 86 |
| 87 class StackHandlerConstants : public AllStatic { | 87 class StackHandlerConstants : public AllStatic { |
| 88 public: | 88 public: |
| 89 static const int kNextOffset = 0 * kPointerSize; | 89 static const int kNextOffset = 0 * kPointerSize; |
| 90 static const int kCodeOffset = 1 * kPointerSize; | 90 static const int kCodeOffset = 1 * kPointerSize; |
| 91 static const int kStateOffset = 2 * kPointerSize; | 91 static const int kStateOffset = 2 * kPointerSize; |
| 92 static const int kContextOffset = 3 * kPointerSize; | 92 static const int kContextOffset = 3 * kPointerSize; |
| 93 static const int kFPOffset = 4 * kPointerSize; | 93 static const int kFPOffset = 4 * kPointerSize; |
| 94 | 94 |
| 95 static const int kSize = kFPOffset + kPointerSize; | 95 static const int kSize = kFPOffset + kFPOnStackSize; |
| 96 static const int kSlotCount = kSize >> kPointerSizeLog2; | 96 static const int kSlotCount = kSize >> kPointerSizeLog2; |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 | 99 |
| 100 class StackHandler BASE_EMBEDDED { | 100 class StackHandler BASE_EMBEDDED { |
| 101 public: | 101 public: |
| 102 enum Kind { | 102 enum Kind { |
| 103 JS_ENTRY, | 103 JS_ENTRY, |
| 104 CATCH, | 104 CATCH, |
| 105 FINALLY, | 105 FINALLY, |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 V(CONSTRUCT, ConstructFrame) \ | 161 V(CONSTRUCT, ConstructFrame) \ |
| 162 V(ARGUMENTS_ADAPTOR, ArgumentsAdaptorFrame) | 162 V(ARGUMENTS_ADAPTOR, ArgumentsAdaptorFrame) |
| 163 | 163 |
| 164 | 164 |
| 165 class StandardFrameConstants : public AllStatic { | 165 class StandardFrameConstants : public AllStatic { |
| 166 public: | 166 public: |
| 167 // Fixed part of the frame consists of return address, caller fp, | 167 // Fixed part of the frame consists of return address, caller fp, |
| 168 // context and function. | 168 // context and function. |
| 169 // StandardFrame::IterateExpressions assumes that kContextOffset is the last | 169 // StandardFrame::IterateExpressions assumes that kContextOffset is the last |
| 170 // object pointer. | 170 // object pointer. |
| 171 static const int kFixedFrameSize = 4 * kPointerSize; | 171 static const int kFixedFrameSize = kPCOnStackSize + kFPOnStackSize + |
| 172 2 * kPointerSize; |
| 172 static const int kExpressionsOffset = -3 * kPointerSize; | 173 static const int kExpressionsOffset = -3 * kPointerSize; |
| 173 static const int kMarkerOffset = -2 * kPointerSize; | 174 static const int kMarkerOffset = -2 * kPointerSize; |
| 174 static const int kContextOffset = -1 * kPointerSize; | 175 static const int kContextOffset = -1 * kPointerSize; |
| 175 static const int kCallerFPOffset = 0 * kPointerSize; | 176 static const int kCallerFPOffset = 0 * kPointerSize; |
| 176 static const int kCallerPCOffset = +1 * kPointerSize; | 177 static const int kCallerPCOffset = +1 * kFPOnStackSize; |
| 177 static const int kCallerSPOffset = +2 * kPointerSize; | 178 static const int kCallerSPOffset = +2 * kPCOnStackSize; |
| 178 }; | 179 }; |
| 179 | 180 |
| 180 | 181 |
| 181 // Abstract base class for all stack frames. | 182 // Abstract base class for all stack frames. |
| 182 class StackFrame BASE_EMBEDDED { | 183 class StackFrame BASE_EMBEDDED { |
| 183 public: | 184 public: |
| 184 #define DECLARE_TYPE(type, ignore) type, | 185 #define DECLARE_TYPE(type, ignore) type, |
| 185 enum Type { | 186 enum Type { |
| 186 NONE = 0, | 187 NONE = 0, |
| 187 STACK_FRAME_TYPE_LIST(DECLARE_TYPE) | 188 STACK_FRAME_TYPE_LIST(DECLARE_TYPE) |
| (...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 918 }; | 919 }; |
| 919 | 920 |
| 920 | 921 |
| 921 // Reads all frames on the current stack and copies them into the current | 922 // Reads all frames on the current stack and copies them into the current |
| 922 // zone memory. | 923 // zone memory. |
| 923 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); | 924 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); |
| 924 | 925 |
| 925 } } // namespace v8::internal | 926 } } // namespace v8::internal |
| 926 | 927 |
| 927 #endif // V8_FRAMES_H_ | 928 #endif // V8_FRAMES_H_ |
| OLD | NEW |