| 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 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 683 } | 683 } |
| 684 | 684 |
| 685 V8_INLINE bool IsEvalOrArguments(const AstRawString* identifier) const { | 685 V8_INLINE bool IsEvalOrArguments(const AstRawString* identifier) const { |
| 686 return IsEval(identifier) || IsArguments(identifier); | 686 return IsEval(identifier) || IsArguments(identifier); |
| 687 } | 687 } |
| 688 | 688 |
| 689 V8_INLINE bool IsUndefined(const AstRawString* identifier) const { | 689 V8_INLINE bool IsUndefined(const AstRawString* identifier) const { |
| 690 return identifier == ast_value_factory()->undefined_string(); | 690 return identifier == ast_value_factory()->undefined_string(); |
| 691 } | 691 } |
| 692 | 692 |
| 693 V8_INLINE bool IsFutureStrictReserved(const AstRawString* identifier) const { | |
| 694 return scanner()->IdentifierIsFutureStrictReserved(identifier); | |
| 695 } | |
| 696 | |
| 697 // Returns true if the expression is of type "this.foo". | 693 // Returns true if the expression is of type "this.foo". |
| 698 V8_INLINE static bool IsThisProperty(Expression* expression) { | 694 V8_INLINE static bool IsThisProperty(Expression* expression) { |
| 699 DCHECK(expression != NULL); | 695 DCHECK(expression != NULL); |
| 700 Property* property = expression->AsProperty(); | 696 Property* property = expression->AsProperty(); |
| 701 return property != NULL && property->obj()->IsVariableProxy() && | 697 return property != NULL && property->obj()->IsVariableProxy() && |
| 702 property->obj()->AsVariableProxy()->is_this(); | 698 property->obj()->AsVariableProxy()->is_this(); |
| 703 } | 699 } |
| 704 | 700 |
| 705 // This returns true if the expression is an indentifier (wrapped | 701 // This returns true if the expression is an indentifier (wrapped |
| 706 // inside a variable proxy). We exclude the case of 'this', which | 702 // inside a variable proxy). We exclude the case of 'this', which |
| (...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1192 | 1188 |
| 1193 private: | 1189 private: |
| 1194 ParserTarget** variable_; | 1190 ParserTarget** variable_; |
| 1195 ParserTarget* previous_; | 1191 ParserTarget* previous_; |
| 1196 }; | 1192 }; |
| 1197 | 1193 |
| 1198 } // namespace internal | 1194 } // namespace internal |
| 1199 } // namespace v8 | 1195 } // namespace v8 |
| 1200 | 1196 |
| 1201 #endif // V8_PARSING_PARSER_H_ | 1197 #endif // V8_PARSING_PARSER_H_ |
| OLD | NEW |