Chromium Code Reviews| 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 #ifndef V8_TARGET_ARCH_X32 | |
| 95 static const int kSize = kFPOffset + kPointerSize; | 96 static const int kSize = kFPOffset + kPointerSize; |
| 97 #else | |
| 98 static const int kSize = kFPOffset + kHWRegSize; | |
|
danno
2013/07/17 13:33:21
There should be no platform-specific #ifs in this
| |
| 99 #endif | |
| 96 static const int kSlotCount = kSize >> kPointerSizeLog2; | 100 static const int kSlotCount = kSize >> kPointerSizeLog2; |
| 97 }; | 101 }; |
| 98 | 102 |
| 99 | 103 |
| 100 class StackHandler BASE_EMBEDDED { | 104 class StackHandler BASE_EMBEDDED { |
| 101 public: | 105 public: |
| 102 enum Kind { | 106 enum Kind { |
| 103 JS_ENTRY, | 107 JS_ENTRY, |
| 104 CATCH, | 108 CATCH, |
| 105 FINALLY, | 109 FINALLY, |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 161 V(CONSTRUCT, ConstructFrame) \ | 165 V(CONSTRUCT, ConstructFrame) \ |
| 162 V(ARGUMENTS_ADAPTOR, ArgumentsAdaptorFrame) | 166 V(ARGUMENTS_ADAPTOR, ArgumentsAdaptorFrame) |
| 163 | 167 |
| 164 | 168 |
| 165 class StandardFrameConstants : public AllStatic { | 169 class StandardFrameConstants : public AllStatic { |
| 166 public: | 170 public: |
| 167 // Fixed part of the frame consists of return address, caller fp, | 171 // Fixed part of the frame consists of return address, caller fp, |
| 168 // context and function. | 172 // context and function. |
| 169 // StandardFrame::IterateExpressions assumes that kContextOffset is the last | 173 // StandardFrame::IterateExpressions assumes that kContextOffset is the last |
| 170 // object pointer. | 174 // object pointer. |
| 175 #ifndef V8_TARGET_ARCH_X32 | |
| 171 static const int kFixedFrameSize = 4 * kPointerSize; | 176 static const int kFixedFrameSize = 4 * kPointerSize; |
| 172 static const int kExpressionsOffset = -3 * kPointerSize; | 177 static const int kExpressionsOffset = -3 * kPointerSize; |
| 173 static const int kMarkerOffset = -2 * kPointerSize; | 178 static const int kMarkerOffset = -2 * kPointerSize; |
| 174 static const int kContextOffset = -1 * kPointerSize; | 179 static const int kContextOffset = -1 * kPointerSize; |
| 175 static const int kCallerFPOffset = 0 * kPointerSize; | 180 static const int kCallerFPOffset = 0 * kPointerSize; |
| 176 static const int kCallerPCOffset = +1 * kPointerSize; | 181 static const int kCallerPCOffset = +1 * kPointerSize; |
| 177 static const int kCallerSPOffset = +2 * kPointerSize; | 182 static const int kCallerSPOffset = +2 * kPointerSize; |
| 183 #else | |
| 184 static const int kFixedFrameSize = 2 * kPointerSize + 2 * kHWRegSize; | |
|
danno
2013/07/17 13:33:21
See above, if you have the right constants, I thin
| |
| 185 static const int kExpressionsOffset = -3 * kPointerSize; | |
| 186 static const int kMarkerOffset = -2 * kPointerSize; | |
| 187 static const int kContextOffset = -1 * kPointerSize; | |
| 188 static const int kCallerFPOffset = 0 * kPointerSize; | |
| 189 static const int kCallerPCOffset = +1 * kHWRegSize; | |
| 190 static const int kCallerSPOffset = +2 * kHWRegSize; | |
| 191 #endif | |
| 178 }; | 192 }; |
| 179 | 193 |
| 180 | 194 |
| 181 // Abstract base class for all stack frames. | 195 // Abstract base class for all stack frames. |
| 182 class StackFrame BASE_EMBEDDED { | 196 class StackFrame BASE_EMBEDDED { |
| 183 public: | 197 public: |
| 184 #define DECLARE_TYPE(type, ignore) type, | 198 #define DECLARE_TYPE(type, ignore) type, |
| 185 enum Type { | 199 enum Type { |
| 186 NONE = 0, | 200 NONE = 0, |
| 187 STACK_FRAME_TYPE_LIST(DECLARE_TYPE) | 201 STACK_FRAME_TYPE_LIST(DECLARE_TYPE) |
| (...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 918 }; | 932 }; |
| 919 | 933 |
| 920 | 934 |
| 921 // Reads all frames on the current stack and copies them into the current | 935 // Reads all frames on the current stack and copies them into the current |
| 922 // zone memory. | 936 // zone memory. |
| 923 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); | 937 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); |
| 924 | 938 |
| 925 } } // namespace v8::internal | 939 } } // namespace v8::internal |
| 926 | 940 |
| 927 #endif // V8_FRAMES_H_ | 941 #endif // V8_FRAMES_H_ |
| OLD | NEW |