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_SCOPES_H_ | 5 #ifndef V8_DEBUG_DEBUG_SCOPES_H_ |
6 #define V8_DEBUG_DEBUG_SCOPES_H_ | 6 #define V8_DEBUG_DEBUG_SCOPES_H_ |
7 | 7 |
8 #include "src/debug/debug-frames.h" | 8 #include "src/debug/debug-frames.h" |
9 #include "src/frames.h" | 9 #include "src/frames.h" |
10 | 10 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 | 78 |
79 #ifdef DEBUG | 79 #ifdef DEBUG |
80 // Debug print of the content of the current scope. | 80 // Debug print of the content of the current scope. |
81 void DebugPrint(); | 81 void DebugPrint(); |
82 #endif | 82 #endif |
83 | 83 |
84 private: | 84 private: |
85 struct ExtendedScopeInfo { | 85 struct ExtendedScopeInfo { |
86 ExtendedScopeInfo(Handle<ScopeInfo> info, int start, int end) | 86 ExtendedScopeInfo(Handle<ScopeInfo> info, int start, int end) |
87 : scope_info(info), start_position(start), end_position(end) {} | 87 : scope_info(info), start_position(start), end_position(end) {} |
| 88 explicit ExtendedScopeInfo(Handle<ScopeInfo> info) |
| 89 : scope_info(info), start_position(-1), end_position(-1) {} |
88 Handle<ScopeInfo> scope_info; | 90 Handle<ScopeInfo> scope_info; |
89 int start_position; | 91 int start_position; |
90 int end_position; | 92 int end_position; |
| 93 bool is_hidden() { return start_position == -1 && end_position == -1; } |
91 }; | 94 }; |
92 | 95 |
93 Isolate* isolate_; | 96 Isolate* isolate_; |
94 FrameInspector* const frame_inspector_; | 97 FrameInspector* const frame_inspector_; |
95 Handle<Context> context_; | 98 Handle<Context> context_; |
96 List<ExtendedScopeInfo> nested_scope_chain_; | 99 List<ExtendedScopeInfo> nested_scope_chain_; |
97 Handle<StringSet> non_locals_; | 100 Handle<StringSet> non_locals_; |
98 bool seen_script_scope_; | 101 bool seen_script_scope_; |
99 bool failed_; | 102 bool failed_; |
100 | 103 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 void GetNestedScopeChain(Isolate* isolate, Scope* scope, | 161 void GetNestedScopeChain(Isolate* isolate, Scope* scope, |
159 int statement_position); | 162 int statement_position); |
160 | 163 |
161 DISALLOW_IMPLICIT_CONSTRUCTORS(ScopeIterator); | 164 DISALLOW_IMPLICIT_CONSTRUCTORS(ScopeIterator); |
162 }; | 165 }; |
163 | 166 |
164 } // namespace internal | 167 } // namespace internal |
165 } // namespace v8 | 168 } // namespace v8 |
166 | 169 |
167 #endif // V8_DEBUG_DEBUG_SCOPES_H_ | 170 #endif // V8_DEBUG_DEBUG_SCOPES_H_ |
OLD | NEW |