| 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 StandardFrameConstants::kFixedFrameSizeFromFp + 2 * kPointerSize; | 183 StandardFrameConstants::kFixedFrameSizeFromFp + 2 * kPointerSize; |
| 184 | 184 |
| 185 // FP-relative. | 185 // FP-relative. |
| 186 static const int kBytecodeOffsetFromFp = | 186 static const int kBytecodeOffsetFromFp = |
| 187 -StandardFrameConstants::kFixedFrameSizeFromFp - 2 * kPointerSize; | 187 -StandardFrameConstants::kFixedFrameSizeFromFp - 2 * kPointerSize; |
| 188 static const int kRegisterFilePointerFromFp = | 188 static const int kRegisterFilePointerFromFp = |
| 189 -StandardFrameConstants::kFixedFrameSizeFromFp - 3 * kPointerSize; | 189 -StandardFrameConstants::kFixedFrameSizeFromFp - 3 * kPointerSize; |
| 190 | 190 |
| 191 // Expression index for {StandardFrame::GetExpressionAddress}. | 191 // Expression index for {StandardFrame::GetExpressionAddress}. |
| 192 static const int kBytecodeOffsetExpressionIndex = 1; | 192 static const int kBytecodeOffsetExpressionIndex = 1; |
| 193 static const int kRegisterFileExpressionIndex = 2; |
| 193 | 194 |
| 194 // Register file pointer relative. | 195 // Register file pointer relative. |
| 195 static const int kLastParamFromRegisterPointer = | 196 static const int kLastParamFromRegisterPointer = |
| 196 StandardFrameConstants::kFixedFrameSize + 3 * kPointerSize; | 197 StandardFrameConstants::kFixedFrameSize + 3 * kPointerSize; |
| 197 | 198 |
| 198 static const int kBytecodeOffsetFromRegisterPointer = 1 * kPointerSize; | 199 static const int kBytecodeOffsetFromRegisterPointer = 1 * kPointerSize; |
| 199 static const int kNewTargetFromRegisterPointer = 2 * kPointerSize; | 200 static const int kNewTargetFromRegisterPointer = 2 * kPointerSize; |
| 200 static const int kFunctionFromRegisterPointer = 3 * kPointerSize; | 201 static const int kFunctionFromRegisterPointer = 3 * kPointerSize; |
| 201 static const int kContextFromRegisterPointer = 4 * kPointerSize; | 202 static const int kContextFromRegisterPointer = 4 * kPointerSize; |
| 202 }; | 203 }; |
| (...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 725 int LookupExceptionHandlerInTable( | 726 int LookupExceptionHandlerInTable( |
| 726 int* stack_slots, HandlerTable::CatchPrediction* prediction) override; | 727 int* stack_slots, HandlerTable::CatchPrediction* prediction) override; |
| 727 | 728 |
| 728 // Returns the current offset into the bytecode stream. | 729 // Returns the current offset into the bytecode stream. |
| 729 int GetBytecodeOffset() const; | 730 int GetBytecodeOffset() const; |
| 730 | 731 |
| 731 // Updates the current offset into the bytecode stream, mainly used for stack | 732 // Updates the current offset into the bytecode stream, mainly used for stack |
| 732 // unwinding to continue execution at a different bytecode offset. | 733 // unwinding to continue execution at a different bytecode offset. |
| 733 void PatchBytecodeOffset(int new_offset); | 734 void PatchBytecodeOffset(int new_offset); |
| 734 | 735 |
| 736 // Access to the interpreter register file for this frame. |
| 737 Object* GetInterpreterRegister(int register_index) const; |
| 738 |
| 735 // Build a list with summaries for this frame including all inlined frames. | 739 // Build a list with summaries for this frame including all inlined frames. |
| 736 void Summarize(List<FrameSummary>* frames) override; | 740 void Summarize(List<FrameSummary>* frames) override; |
| 737 | 741 |
| 738 protected: | 742 protected: |
| 739 inline explicit InterpretedFrame(StackFrameIteratorBase* iterator); | 743 inline explicit InterpretedFrame(StackFrameIteratorBase* iterator); |
| 740 | 744 |
| 741 private: | 745 private: |
| 742 friend class StackFrameIteratorBase; | 746 friend class StackFrameIteratorBase; |
| 743 }; | 747 }; |
| 744 | 748 |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 987 | 991 |
| 988 | 992 |
| 989 // Reads all frames on the current stack and copies them into the current | 993 // Reads all frames on the current stack and copies them into the current |
| 990 // zone memory. | 994 // zone memory. |
| 991 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); | 995 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); |
| 992 | 996 |
| 993 } // namespace internal | 997 } // namespace internal |
| 994 } // namespace v8 | 998 } // namespace v8 |
| 995 | 999 |
| 996 #endif // V8_FRAMES_H_ | 1000 #endif // V8_FRAMES_H_ |
| OLD | NEW |