OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_DEBUG_DEBUG_FRAMES_H_ | 5 #ifndef V8_DEBUG_DEBUG_FRAMES_H_ |
6 #define V8_DEBUG_DEBUG_FRAMES_H_ | 6 #define V8_DEBUG_DEBUG_FRAMES_H_ |
7 | 7 |
8 #include "src/deoptimizer.h" | 8 #include "src/deoptimizer.h" |
9 #include "src/frames.h" | 9 #include "src/frames.h" |
10 #include "src/isolate.h" | 10 #include "src/isolate.h" |
11 #include "src/objects.h" | 11 #include "src/objects.h" |
12 | 12 |
13 namespace v8 { | 13 namespace v8 { |
14 namespace internal { | 14 namespace internal { |
15 | 15 |
16 class FrameInspector { | 16 class FrameInspector { |
17 public: | 17 public: |
18 FrameInspector(StandardFrame* frame, int inlined_jsframe_index, | 18 FrameInspector(StandardFrame* frame, int inlined_frame_index, |
19 Isolate* isolate); | 19 Isolate* isolate); |
20 | 20 |
21 ~FrameInspector(); | 21 ~FrameInspector(); |
22 | 22 |
| 23 FrameSummary& summary() { return frame_summary_; } |
| 24 |
23 int GetParametersCount(); | 25 int GetParametersCount(); |
24 Handle<JSFunction> GetFunction(); | 26 Handle<JSFunction> GetFunction(); |
25 Handle<Script> GetScript(); | 27 Handle<Script> GetScript(); |
26 Handle<Object> GetParameter(int index); | 28 Handle<Object> GetParameter(int index); |
27 Handle<Object> GetExpression(int index); | 29 Handle<Object> GetExpression(int index); |
28 int GetSourcePosition(); | 30 int GetSourcePosition(); |
29 bool IsConstructor(); | 31 bool IsConstructor(); |
30 Handle<Object> GetContext(); | 32 Handle<Object> GetContext(); |
31 | 33 |
32 inline JavaScriptFrame* javascript_frame() { | 34 inline JavaScriptFrame* javascript_frame() { |
33 return frame_->is_arguments_adaptor() ? ArgumentsAdaptorFrame::cast(frame_) | 35 return frame_->is_arguments_adaptor() ? ArgumentsAdaptorFrame::cast(frame_) |
34 : JavaScriptFrame::cast(frame_); | 36 : JavaScriptFrame::cast(frame_); |
35 } | 37 } |
36 inline WasmCompiledFrame* wasm_frame() { | |
37 return WasmCompiledFrame::cast(frame_); | |
38 } | |
39 | 38 |
40 JavaScriptFrame* GetArgumentsFrame() { return javascript_frame(); } | 39 JavaScriptFrame* GetArgumentsFrame() { return javascript_frame(); } |
41 void SetArgumentsFrame(StandardFrame* frame); | 40 void SetArgumentsFrame(StandardFrame* frame); |
42 | 41 |
43 void MaterializeStackLocals(Handle<JSObject> target, | 42 void MaterializeStackLocals(Handle<JSObject> target, |
44 Handle<ScopeInfo> scope_info); | 43 Handle<ScopeInfo> scope_info); |
45 | 44 |
46 void MaterializeStackLocals(Handle<JSObject> target, | 45 void MaterializeStackLocals(Handle<JSObject> target, |
47 Handle<JSFunction> function); | 46 Handle<JSFunction> function); |
48 | 47 |
49 void UpdateStackLocalsFromMaterializedObject(Handle<JSObject> object, | 48 void UpdateStackLocalsFromMaterializedObject(Handle<JSObject> object, |
50 Handle<ScopeInfo> scope_info); | 49 Handle<ScopeInfo> scope_info); |
51 | 50 |
52 private: | 51 private: |
53 bool ParameterIsShadowedByContextLocal(Handle<ScopeInfo> info, | 52 bool ParameterIsShadowedByContextLocal(Handle<ScopeInfo> info, |
54 Handle<String> parameter_name); | 53 Handle<String> parameter_name); |
55 | 54 |
56 StandardFrame* frame_; | 55 StandardFrame* frame_; |
| 56 FrameSummary frame_summary_; |
57 DeoptimizedFrameInfo* deoptimized_frame_; | 57 DeoptimizedFrameInfo* deoptimized_frame_; |
58 Isolate* isolate_; | 58 Isolate* isolate_; |
59 bool is_optimized_; | 59 bool is_optimized_; |
60 bool is_interpreted_; | 60 bool is_interpreted_; |
61 bool is_bottommost_; | 61 bool is_bottommost_; |
62 bool has_adapted_arguments_; | 62 bool has_adapted_arguments_; |
63 | 63 |
64 DISALLOW_COPY_AND_ASSIGN(FrameInspector); | 64 DISALLOW_COPY_AND_ASSIGN(FrameInspector); |
65 }; | 65 }; |
66 | 66 |
(...skipping 14 matching lines...) Expand all Loading... |
81 | 81 |
82 static StackFrame::Id UnwrapFrameId(int wrapped) { | 82 static StackFrame::Id UnwrapFrameId(int wrapped) { |
83 return static_cast<StackFrame::Id>(wrapped << 2); | 83 return static_cast<StackFrame::Id>(wrapped << 2); |
84 } | 84 } |
85 }; | 85 }; |
86 | 86 |
87 } // namespace internal | 87 } // namespace internal |
88 } // namespace v8 | 88 } // namespace v8 |
89 | 89 |
90 #endif // V8_DEBUG_DEBUG_FRAMES_H_ | 90 #endif // V8_DEBUG_DEBUG_FRAMES_H_ |
OLD | NEW |