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 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
743 V8_INLINE bool IsConstructor(const AstRawString* identifier) const { | 743 V8_INLINE bool IsConstructor(const AstRawString* identifier) const { |
744 return identifier == ast_value_factory()->constructor_string(); | 744 return identifier == ast_value_factory()->constructor_string(); |
745 } | 745 } |
746 | 746 |
747 V8_INLINE bool IsName(const AstRawString* identifier) const { | 747 V8_INLINE bool IsName(const AstRawString* identifier) const { |
748 return identifier == ast_value_factory()->name_string(); | 748 return identifier == ast_value_factory()->name_string(); |
749 } | 749 } |
750 | 750 |
751 V8_INLINE static bool IsBoilerplateProperty( | 751 V8_INLINE static bool IsBoilerplateProperty( |
752 ObjectLiteral::Property* property) { | 752 ObjectLiteral::Property* property) { |
753 return ObjectLiteral::IsBoilerplateProperty(property); | 753 return !property->IsPrototype(); |
754 } | 754 } |
755 | 755 |
756 V8_INLINE bool IsNative(Expression* expr) const { | 756 V8_INLINE bool IsNative(Expression* expr) const { |
757 DCHECK_NOT_NULL(expr); | 757 DCHECK_NOT_NULL(expr); |
758 return expr->IsVariableProxy() && | 758 return expr->IsVariableProxy() && |
759 expr->AsVariableProxy()->raw_name() == | 759 expr->AsVariableProxy()->raw_name() == |
760 ast_value_factory()->native_string(); | 760 ast_value_factory()->native_string(); |
761 } | 761 } |
762 | 762 |
763 V8_INLINE static bool IsArrayIndex(const AstRawString* string, | 763 V8_INLINE static bool IsArrayIndex(const AstRawString* string, |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1214 | 1214 |
1215 private: | 1215 private: |
1216 ParserTarget** variable_; | 1216 ParserTarget** variable_; |
1217 ParserTarget* previous_; | 1217 ParserTarget* previous_; |
1218 }; | 1218 }; |
1219 | 1219 |
1220 } // namespace internal | 1220 } // namespace internal |
1221 } // namespace v8 | 1221 } // namespace v8 |
1222 | 1222 |
1223 #endif // V8_PARSING_PARSER_H_ | 1223 #endif // V8_PARSING_PARSER_H_ |
OLD | NEW |