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_AST_SCOPES_H_ | 5 #ifndef V8_AST_SCOPES_H_ |
6 #define V8_AST_SCOPES_H_ | 6 #define V8_AST_SCOPES_H_ |
7 | 7 |
8 #include "src/base/hashmap.h" | 8 #include "src/base/hashmap.h" |
9 #include "src/globals.h" | 9 #include "src/globals.h" |
10 #include "src/objects.h" | 10 #include "src/objects.h" |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 | 408 |
409 // Retrieve `IsSimpleParameterList` of current or outer function. | 409 // Retrieve `IsSimpleParameterList` of current or outer function. |
410 bool HasSimpleParameters(); | 410 bool HasSimpleParameters(); |
411 void set_is_debug_evaluate_scope() { is_debug_evaluate_scope_ = true; } | 411 void set_is_debug_evaluate_scope() { is_debug_evaluate_scope_ = true; } |
412 bool is_debug_evaluate_scope() const { return is_debug_evaluate_scope_; } | 412 bool is_debug_evaluate_scope() const { return is_debug_evaluate_scope_; } |
413 | 413 |
414 void set_is_lazily_parsed(bool is_lazily_parsed) { | 414 void set_is_lazily_parsed(bool is_lazily_parsed) { |
415 is_lazily_parsed_ = is_lazily_parsed; | 415 is_lazily_parsed_ = is_lazily_parsed; |
416 } | 416 } |
417 | 417 |
| 418 // Return true if this local was introduced by the compiler, and should not be |
| 419 // exposed to the user in a debugger. |
| 420 // Parallel to ScopeInfo::VariableIsSynthetic, an AstRawString version must |
| 421 // exist so the predicate can be called on un-internalized strings. |
| 422 static bool VariableIsSynthetic(const AstRawString* name); |
| 423 |
418 protected: | 424 protected: |
419 explicit Scope(Zone* zone); | 425 explicit Scope(Zone* zone); |
420 | 426 |
421 void set_language_mode(LanguageMode language_mode) { | 427 void set_language_mode(LanguageMode language_mode) { |
422 is_strict_ = is_strict(language_mode); | 428 is_strict_ = is_strict(language_mode); |
423 } | 429 } |
424 | 430 |
425 private: | 431 private: |
426 Variable* Declare(Zone* zone, Scope* scope, const AstRawString* name, | 432 Variable* Declare(Zone* zone, Scope* scope, const AstRawString* name, |
427 VariableMode mode, VariableKind kind, | 433 VariableMode mode, VariableKind kind, |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
868 void AllocateModuleVariables(); | 874 void AllocateModuleVariables(); |
869 | 875 |
870 private: | 876 private: |
871 ModuleDescriptor* module_descriptor_; | 877 ModuleDescriptor* module_descriptor_; |
872 }; | 878 }; |
873 | 879 |
874 } // namespace internal | 880 } // namespace internal |
875 } // namespace v8 | 881 } // namespace v8 |
876 | 882 |
877 #endif // V8_AST_SCOPES_H_ | 883 #endif // V8_AST_SCOPES_H_ |
OLD | NEW |