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_PARSING_PARSER_H_ | 5 #ifndef V8_PARSING_PARSER_H_ |
6 #define V8_PARSING_PARSER_H_ | 6 #define V8_PARSING_PARSER_H_ |
7 | 7 |
8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
10 #include "src/base/compiler-specific.h" | 10 #include "src/base/compiler-specific.h" |
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
670 } | 670 } |
671 | 671 |
672 V8_INLINE bool IsPrototype(const AstRawString* identifier) const { | 672 V8_INLINE bool IsPrototype(const AstRawString* identifier) const { |
673 return identifier == ast_value_factory()->prototype_string(); | 673 return identifier == ast_value_factory()->prototype_string(); |
674 } | 674 } |
675 | 675 |
676 V8_INLINE bool IsConstructor(const AstRawString* identifier) const { | 676 V8_INLINE bool IsConstructor(const AstRawString* identifier) const { |
677 return identifier == ast_value_factory()->constructor_string(); | 677 return identifier == ast_value_factory()->constructor_string(); |
678 } | 678 } |
679 | 679 |
| 680 V8_INLINE bool IsName(const AstRawString* identifier) const { |
| 681 return identifier == ast_value_factory()->name_string(); |
| 682 } |
| 683 |
680 V8_INLINE bool IsDirectEvalCall(Expression* expression) const { | 684 V8_INLINE bool IsDirectEvalCall(Expression* expression) const { |
681 if (!expression->IsCall()) return false; | 685 if (!expression->IsCall()) return false; |
682 expression = expression->AsCall()->expression(); | 686 expression = expression->AsCall()->expression(); |
683 return IsIdentifier(expression) && IsEval(AsIdentifier(expression)); | 687 return IsIdentifier(expression) && IsEval(AsIdentifier(expression)); |
684 } | 688 } |
685 | 689 |
686 V8_INLINE static bool IsBoilerplateProperty( | 690 V8_INLINE static bool IsBoilerplateProperty( |
687 ObjectLiteral::Property* property) { | 691 ObjectLiteral::Property* property) { |
688 return ObjectLiteral::IsBoilerplateProperty(property); | 692 return ObjectLiteral::IsBoilerplateProperty(property); |
689 } | 693 } |
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1142 | 1146 |
1143 private: | 1147 private: |
1144 ParserTarget** variable_; | 1148 ParserTarget** variable_; |
1145 ParserTarget* previous_; | 1149 ParserTarget* previous_; |
1146 }; | 1150 }; |
1147 | 1151 |
1148 } // namespace internal | 1152 } // namespace internal |
1149 } // namespace v8 | 1153 } // namespace v8 |
1150 | 1154 |
1151 #endif // V8_PARSING_PARSER_H_ | 1155 #endif // V8_PARSING_PARSER_H_ |
OLD | NEW |