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/parsing/parser-base.h" | 10 #include "src/parsing/parser-base.h" |
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
872 | 872 |
873 // "null" return type creators. | 873 // "null" return type creators. |
874 V8_INLINE static const AstRawString* EmptyIdentifier() { return nullptr; } | 874 V8_INLINE static const AstRawString* EmptyIdentifier() { return nullptr; } |
875 V8_INLINE static Expression* EmptyExpression() { return nullptr; } | 875 V8_INLINE static Expression* EmptyExpression() { return nullptr; } |
876 V8_INLINE static Literal* EmptyLiteral() { return nullptr; } | 876 V8_INLINE static Literal* EmptyLiteral() { return nullptr; } |
877 V8_INLINE static ObjectLiteralProperty* EmptyObjectLiteralProperty() { | 877 V8_INLINE static ObjectLiteralProperty* EmptyObjectLiteralProperty() { |
878 return nullptr; | 878 return nullptr; |
879 } | 879 } |
880 V8_INLINE static FunctionLiteral* EmptyFunctionLiteral() { return nullptr; } | 880 V8_INLINE static FunctionLiteral* EmptyFunctionLiteral() { return nullptr; } |
881 | 881 |
| 882 V8_INLINE static bool IsEmptyExpression(Expression* expr) { |
| 883 return expr == nullptr; |
| 884 } |
| 885 |
882 // Used in error return values. | 886 // Used in error return values. |
883 V8_INLINE static ZoneList<Expression*>* NullExpressionList() { | 887 V8_INLINE static ZoneList<Expression*>* NullExpressionList() { |
884 return nullptr; | 888 return nullptr; |
885 } | 889 } |
886 | 890 |
887 // Non-NULL empty string. | 891 // Non-NULL empty string. |
888 V8_INLINE const AstRawString* EmptyIdentifierString() const { | 892 V8_INLINE const AstRawString* EmptyIdentifierString() const { |
889 return ast_value_factory()->empty_string(); | 893 return ast_value_factory()->empty_string(); |
890 } | 894 } |
891 | 895 |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1082 static const int kLiteralTypeSlot = 0; | 1086 static const int kLiteralTypeSlot = 0; |
1083 static const int kElementsSlot = 1; | 1087 static const int kElementsSlot = 1; |
1084 | 1088 |
1085 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); | 1089 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); |
1086 }; | 1090 }; |
1087 | 1091 |
1088 } // namespace internal | 1092 } // namespace internal |
1089 } // namespace v8 | 1093 } // namespace v8 |
1090 | 1094 |
1091 #endif // V8_PARSING_PARSER_H_ | 1095 #endif // V8_PARSING_PARSER_H_ |
OLD | NEW |