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/ast/ast.h" | 8 #include "src/ast/ast.h" |
9 #include "src/base/hashmap.h" | 9 #include "src/base/hashmap.h" |
10 #include "src/pending-compilation-error-handler.h" | 10 #include "src/pending-compilation-error-handler.h" |
adamk
2016/06/21 16:30:31
I think this can be removed, along with the member
| |
11 #include "src/zone.h" | 11 #include "src/zone.h" |
12 | 12 |
13 namespace v8 { | 13 namespace v8 { |
14 namespace internal { | 14 namespace internal { |
15 | 15 |
16 class ParseInfo; | 16 class ParseInfo; |
17 | 17 |
18 // A hash map to support fast variable declaration and lookup. | 18 // A hash map to support fast variable declaration and lookup. |
19 class VariableMap: public ZoneHashMap { | 19 class VariableMap: public ZoneHashMap { |
20 public: | 20 public: |
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
564 // If IsSimpleParameterList is false, duplicate parameters are not allowed, | 564 // If IsSimpleParameterList is false, duplicate parameters are not allowed, |
565 // however `arguments` may be allowed if function is not strict code. Thus, | 565 // however `arguments` may be allowed if function is not strict code. Thus, |
566 // the assumptions explained above do not hold. | 566 // the assumptions explained above do not hold. |
567 return params_.Contains(variables_.Lookup(name)); | 567 return params_.Contains(variables_.Lookup(name)); |
568 } | 568 } |
569 | 569 |
570 SloppyBlockFunctionMap* sloppy_block_function_map() { | 570 SloppyBlockFunctionMap* sloppy_block_function_map() { |
571 return &sloppy_block_function_map_; | 571 return &sloppy_block_function_map_; |
572 } | 572 } |
573 | 573 |
574 // Error handling. | |
575 void ReportMessage(int start_position, int end_position, | |
576 MessageTemplate::Template message, | |
577 const AstRawString* arg); | |
578 | |
579 // --------------------------------------------------------------------------- | 574 // --------------------------------------------------------------------------- |
580 // Debugging. | 575 // Debugging. |
581 | 576 |
582 #ifdef DEBUG | 577 #ifdef DEBUG |
583 void Print(int n = 0); // n = indentation; n < 0 => don't print recursively | 578 void Print(int n = 0); // n = indentation; n < 0 => don't print recursively |
584 | 579 |
585 // Check that the scope has positions assigned. | 580 // Check that the scope has positions assigned. |
586 void CheckScopePositions(); | 581 void CheckScopePositions(); |
587 #endif | 582 #endif |
588 | 583 |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
807 } | 802 } |
808 } | 803 } |
809 | 804 |
810 void SetDefaults(ScopeType type, Scope* outer_scope, | 805 void SetDefaults(ScopeType type, Scope* outer_scope, |
811 Handle<ScopeInfo> scope_info, | 806 Handle<ScopeInfo> scope_info, |
812 FunctionKind function_kind = kNormalFunction); | 807 FunctionKind function_kind = kNormalFunction); |
813 | 808 |
814 AstValueFactory* ast_value_factory_; | 809 AstValueFactory* ast_value_factory_; |
815 Zone* zone_; | 810 Zone* zone_; |
816 | 811 |
817 PendingCompilationErrorHandler pending_error_handler_; | 812 PendingCompilationErrorHandler pending_error_handler_; |
adamk
2016/06/21 16:30:31
Can this be removed too?
| |
818 }; | 813 }; |
819 | 814 |
820 } // namespace internal | 815 } // namespace internal |
821 } // namespace v8 | 816 } // namespace v8 |
822 | 817 |
823 #endif // V8_AST_SCOPES_H_ | 818 #endif // V8_AST_SCOPES_H_ |
OLD | NEW |