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 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
694 static inline bool IsConstructFrame(Address fp); | 694 static inline bool IsConstructFrame(Address fp); |
695 | 695 |
696 // Used by OptimizedFrames and StubFrames. | 696 // Used by OptimizedFrames and StubFrames. |
697 void IterateCompiledFrame(ObjectVisitor* v) const; | 697 void IterateCompiledFrame(ObjectVisitor* v) const; |
698 | 698 |
699 private: | 699 private: |
700 friend class StackFrame; | 700 friend class StackFrame; |
701 friend class SafeStackFrameIterator; | 701 friend class SafeStackFrameIterator; |
702 }; | 702 }; |
703 | 703 |
704 class JavaScriptFrame; | |
704 | 705 |
705 class FrameSummary BASE_EMBEDDED { | 706 class FrameSummary BASE_EMBEDDED { |
706 public: | 707 public: |
707 FrameSummary(Object* receiver, JSFunction* function, | 708 FrameSummary(Object* receiver, JSFunction* function, |
708 AbstractCode* abstract_code, int code_offset, | 709 AbstractCode* abstract_code, int code_offset, |
709 bool is_constructor); | 710 bool is_constructor); |
710 | 711 |
712 static FrameSummary GetFirst(JavaScriptFrame* frame); | |
713 | |
711 Handle<Object> receiver() { return receiver_; } | 714 Handle<Object> receiver() { return receiver_; } |
712 Handle<JSFunction> function() { return function_; } | 715 Handle<JSFunction> function() { return function_; } |
713 Handle<AbstractCode> abstract_code() { return abstract_code_; } | 716 Handle<AbstractCode> abstract_code() { return abstract_code_; } |
714 int code_offset() { return code_offset_; } | 717 int code_offset() { return code_offset_; } |
715 bool is_constructor() { return is_constructor_; } | 718 bool is_constructor() { return is_constructor_; } |
716 | 719 |
717 void Print(); | 720 void Print(); |
718 | 721 |
719 private: | 722 private: |
720 Handle<Object> receiver_; | 723 Handle<Object> receiver_; |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
886 int* data, HandlerTable::CatchPrediction* prediction) override; | 889 int* data, HandlerTable::CatchPrediction* prediction) override; |
887 | 890 |
888 // Returns the current offset into the bytecode stream. | 891 // Returns the current offset into the bytecode stream. |
889 int GetBytecodeOffset() const; | 892 int GetBytecodeOffset() const; |
890 | 893 |
891 // Updates the current offset into the bytecode stream, mainly used for stack | 894 // Updates the current offset into the bytecode stream, mainly used for stack |
892 // unwinding to continue execution at a different bytecode offset. | 895 // unwinding to continue execution at a different bytecode offset. |
893 void PatchBytecodeOffset(int new_offset); | 896 void PatchBytecodeOffset(int new_offset); |
894 | 897 |
895 // Returns the frame's current bytecode array. | 898 // Returns the frame's current bytecode array. |
896 Object* GetBytecodeArray() const; | 899 BytecodeArray* GetBytecodeArray() const; |
897 | 900 |
898 // Updates the frame's BytecodeArray with |bytecode_array|. Used by the | 901 // Updates the frame's BytecodeArray with |bytecode_array|. Used by the |
899 // debugger to swap execution onto a BytecodeArray patched with breakpoints. | 902 // debugger to swap execution onto a BytecodeArray patched with breakpoints. |
900 void PatchBytecodeArray(Object* bytecode_array); | 903 void PatchBytecodeArray(Object* bytecode_array); |
Michael Starzinger
2016/04/05 09:56:49
nit: Let's also change the signature of the setter
| |
901 | 904 |
902 // Access to the interpreter register file for this frame. | 905 // Access to the interpreter register file for this frame. |
903 Object* GetInterpreterRegister(int register_index) const; | 906 Object* GetInterpreterRegister(int register_index) const; |
904 | 907 |
905 // Build a list with summaries for this frame including all inlined frames. | 908 // Build a list with summaries for this frame including all inlined frames. |
906 void Summarize(List<FrameSummary>* frames) override; | 909 void Summarize(List<FrameSummary>* frames) override; |
907 | 910 |
908 protected: | 911 protected: |
909 inline explicit InterpretedFrame(StackFrameIteratorBase* iterator); | 912 inline explicit InterpretedFrame(StackFrameIteratorBase* iterator); |
910 | 913 |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1200 | 1203 |
1201 | 1204 |
1202 // Reads all frames on the current stack and copies them into the current | 1205 // Reads all frames on the current stack and copies them into the current |
1203 // zone memory. | 1206 // zone memory. |
1204 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); | 1207 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); |
1205 | 1208 |
1206 } // namespace internal | 1209 } // namespace internal |
1207 } // namespace v8 | 1210 } // namespace v8 |
1208 | 1211 |
1209 #endif // V8_FRAMES_H_ | 1212 #endif // V8_FRAMES_H_ |
OLD | NEW |