| 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 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 663 static BuiltinExitFrame* cast(StackFrame* frame) { | 663 static BuiltinExitFrame* cast(StackFrame* frame) { |
| 664 DCHECK(frame->is_builtin_exit()); | 664 DCHECK(frame->is_builtin_exit()); |
| 665 return static_cast<BuiltinExitFrame*>(frame); | 665 return static_cast<BuiltinExitFrame*>(frame); |
| 666 } | 666 } |
| 667 | 667 |
| 668 JSFunction* function() const; | 668 JSFunction* function() const; |
| 669 Object* receiver() const; | 669 Object* receiver() const; |
| 670 | 670 |
| 671 bool IsConstructor() const; | 671 bool IsConstructor() const; |
| 672 | 672 |
| 673 void Print(StringStream* accumulator, PrintMode mode, |
| 674 int index) const override; |
| 675 |
| 673 protected: | 676 protected: |
| 674 inline explicit BuiltinExitFrame(StackFrameIteratorBase* iterator); | 677 inline explicit BuiltinExitFrame(StackFrameIteratorBase* iterator); |
| 675 | 678 |
| 676 private: | 679 private: |
| 680 Object* GetParameter(int i) const; |
| 681 int ComputeParametersCount() const; |
| 682 |
| 683 inline Object* receiver_slot_object() const; |
| 684 inline Object* argc_slot_object() const; |
| 677 inline Object* target_slot_object() const; | 685 inline Object* target_slot_object() const; |
| 678 inline Object* new_target_slot_object() const; | 686 inline Object* new_target_slot_object() const; |
| 679 inline Object* receiver_slot_object() const; | |
| 680 | 687 |
| 681 friend class StackFrameIteratorBase; | 688 friend class StackFrameIteratorBase; |
| 682 }; | 689 }; |
| 683 | 690 |
| 684 class JavaScriptFrame; | 691 class JavaScriptFrame; |
| 685 | 692 |
| 686 class FrameSummary BASE_EMBEDDED { | 693 class FrameSummary BASE_EMBEDDED { |
| 687 public: | 694 public: |
| 688 // Mode for JavaScriptFrame::Summarize. Exact summary is required to produce | 695 // Mode for JavaScriptFrame::Summarize. Exact summary is required to produce |
| 689 // an exact stack trace. It will trigger an assertion failure if that is not | 696 // an exact stack trace. It will trigger an assertion failure if that is not |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1015 // various standard library functions (i.e. Math.asin, Math.floor, etc.). | 1022 // various standard library functions (i.e. Math.asin, Math.floor, etc.). |
| 1016 class BuiltinFrame final : public JavaScriptFrame { | 1023 class BuiltinFrame final : public JavaScriptFrame { |
| 1017 public: | 1024 public: |
| 1018 Type type() const final { return BUILTIN; } | 1025 Type type() const final { return BUILTIN; } |
| 1019 | 1026 |
| 1020 static BuiltinFrame* cast(StackFrame* frame) { | 1027 static BuiltinFrame* cast(StackFrame* frame) { |
| 1021 DCHECK(frame->is_builtin()); | 1028 DCHECK(frame->is_builtin()); |
| 1022 return static_cast<BuiltinFrame*>(frame); | 1029 return static_cast<BuiltinFrame*>(frame); |
| 1023 } | 1030 } |
| 1024 | 1031 |
| 1025 // Printing support. | |
| 1026 void Print(StringStream* accumulator, PrintMode mode, int index) const final; | |
| 1027 | |
| 1028 protected: | 1032 protected: |
| 1029 inline explicit BuiltinFrame(StackFrameIteratorBase* iterator); | 1033 inline explicit BuiltinFrame(StackFrameIteratorBase* iterator); |
| 1030 | 1034 |
| 1031 int GetNumberOfIncomingArguments() const final; | 1035 int GetNumberOfIncomingArguments() const final; |
| 1032 | 1036 |
| 1033 private: | 1037 private: |
| 1034 friend class StackFrameIteratorBase; | 1038 friend class StackFrameIteratorBase; |
| 1035 }; | 1039 }; |
| 1036 | 1040 |
| 1037 class WasmFrame : public StandardFrame { | 1041 class WasmFrame : public StandardFrame { |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1306 | 1310 |
| 1307 | 1311 |
| 1308 // Reads all frames on the current stack and copies them into the current | 1312 // Reads all frames on the current stack and copies them into the current |
| 1309 // zone memory. | 1313 // zone memory. |
| 1310 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); | 1314 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); |
| 1311 | 1315 |
| 1312 } // namespace internal | 1316 } // namespace internal |
| 1313 } // namespace v8 | 1317 } // namespace v8 |
| 1314 | 1318 |
| 1315 #endif // V8_FRAMES_H_ | 1319 #endif // V8_FRAMES_H_ |
| OLD | NEW |