| 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_PREPARSER_H | 5 #ifndef V8_PARSING_PREPARSER_H |
| 6 #define V8_PARSING_PREPARSER_H | 6 #define V8_PARSING_PREPARSER_H |
| 7 | 7 |
| 8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
| 9 #include "src/bailout-reason.h" | 9 #include "src/bailout-reason.h" |
| 10 #include "src/hashmap.h" | 10 #include "src/hashmap.h" |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 PreParserIdentifier AsIdentifier() const { | 190 PreParserIdentifier AsIdentifier() const { |
| 191 DCHECK(IsIdentifier()); | 191 DCHECK(IsIdentifier()); |
| 192 return PreParserIdentifier(IdentifierTypeField::decode(code_)); | 192 return PreParserIdentifier(IdentifierTypeField::decode(code_)); |
| 193 } | 193 } |
| 194 | 194 |
| 195 bool IsAssignment() const { | 195 bool IsAssignment() const { |
| 196 return TypeField::decode(code_) == kExpression && | 196 return TypeField::decode(code_) == kExpression && |
| 197 ExpressionTypeField::decode(code_) == kAssignment; | 197 ExpressionTypeField::decode(code_) == kAssignment; |
| 198 } | 198 } |
| 199 | 199 |
| 200 bool IsRewritableAssignmentExpression() const { return IsAssignment(); } |
| 201 |
| 200 bool IsObjectLiteral() const { | 202 bool IsObjectLiteral() const { |
| 201 return TypeField::decode(code_) == kObjectLiteralExpression; | 203 return TypeField::decode(code_) == kObjectLiteralExpression; |
| 202 } | 204 } |
| 203 | 205 |
| 204 bool IsArrayLiteral() const { | 206 bool IsArrayLiteral() const { |
| 205 return TypeField::decode(code_) == kArrayLiteralExpression; | 207 return TypeField::decode(code_) == kArrayLiteralExpression; |
| 206 } | 208 } |
| 207 | 209 |
| 208 bool IsStringLiteral() const { | 210 bool IsStringLiteral() const { |
| 209 return TypeField::decode(code_) == kStringLiteralExpression; | 211 return TypeField::decode(code_) == kStringLiteralExpression; |
| (...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1161 const PreParserFormalParameters& parameters, FunctionKind kind, | 1163 const PreParserFormalParameters& parameters, FunctionKind kind, |
| 1162 FunctionLiteral::FunctionType function_type, bool* ok) { | 1164 FunctionLiteral::FunctionType function_type, bool* ok) { |
| 1163 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters, | 1165 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters, |
| 1164 kind, function_type, ok); | 1166 kind, function_type, ok); |
| 1165 } | 1167 } |
| 1166 | 1168 |
| 1167 } // namespace internal | 1169 } // namespace internal |
| 1168 } // namespace v8 | 1170 } // namespace v8 |
| 1169 | 1171 |
| 1170 #endif // V8_PARSING_PREPARSER_H | 1172 #endif // V8_PARSING_PREPARSER_H |
| OLD | NEW |