Index: src/parsing/preparser.h |
diff --git a/src/parsing/preparser.h b/src/parsing/preparser.h |
index cfbfe0ecc8f322bb23fc7e75d259b3b355232aec..93e00be6bae5e619b0cbf5cc23797ff6955d4bbf 100644 |
--- a/src/parsing/preparser.h |
+++ b/src/parsing/preparser.h |
@@ -196,6 +196,8 @@ |
return TypeField::decode(code_) == kExpression && |
ExpressionTypeField::decode(code_) == kAssignment; |
} |
+ |
+ bool IsRewritableAssignmentExpression() const { return IsAssignment(); } |
bool IsObjectLiteral() const { |
return TypeField::decode(code_) == kObjectLiteralExpression; |
@@ -485,7 +487,8 @@ |
PreParserExpression right, int pos) { |
return PreParserExpression::Default(); |
} |
- PreParserExpression NewRewritableExpression(PreParserExpression expression) { |
+ PreParserExpression NewRewritableAssignmentExpression( |
+ PreParserExpression expression) { |
return expression; |
} |
PreParserExpression NewAssignment(Token::Value op, |
@@ -585,9 +588,6 @@ |
typedef void GeneratorVariable; |
typedef int AstProperties; |
- |
- typedef v8::internal::ExpressionClassifier<PreParserTraits> |
- ExpressionClassifier; |
// Return types for traversing functions. |
typedef PreParserIdentifier Identifier; |
@@ -885,7 +885,7 @@ |
++parameters->arity; |
} |
void DeclareFormalParameter(Scope* scope, PreParserIdentifier parameter, |
- Type::ExpressionClassifier* classifier) { |
+ ExpressionClassifier* classifier) { |
if (!classifier->is_simple_parameter_list()) { |
scope->SetHasNonSimpleParameters(); |
} |
@@ -923,18 +923,18 @@ |
inline void RewriteDestructuringAssignments() {} |
inline void QueueDestructuringAssignmentForRewriting(PreParserExpression) {} |
- inline void QueueNonPatternForRewriting(PreParserExpression) {} |
void SetFunctionNameFromPropertyName(PreParserExpression, |
PreParserIdentifier) {} |
void SetFunctionNameFromIdentifierRef(PreParserExpression, |
PreParserExpression) {} |
- inline void RewriteNonPattern(Type::ExpressionClassifier* classifier, |
- bool* ok); |
- |
- V8_INLINE Zone* zone() const; |
- V8_INLINE ZoneList<PreParserExpression>* GetNonPatternList() const; |
+ inline PreParserExpression RewriteNonPattern( |
+ PreParserExpression expr, const ExpressionClassifier* classifier, |
+ bool* ok); |
+ inline PreParserExpression RewriteNonPatternObjectLiteralProperty( |
+ PreParserExpression property, const ExpressionClassifier* classifier, |
+ bool* ok); |
inline PreParserExpression RewriteYieldStar( |
PreParserExpression generator, PreParserExpression expr, int pos); |
@@ -1119,19 +1119,19 @@ |
} |
-void PreParserTraits::RewriteNonPattern(Type::ExpressionClassifier* classifier, |
- bool* ok) { |
+PreParserExpression PreParserTraits::RewriteNonPattern( |
+ PreParserExpression expr, const ExpressionClassifier* classifier, |
+ bool* ok) { |
pre_parser_->ValidateExpression(classifier, ok); |
+ return expr; |
} |
-Zone* PreParserTraits::zone() const { |
- return pre_parser_->function_state_->scope()->zone(); |
-} |
- |
- |
-ZoneList<PreParserExpression>* PreParserTraits::GetNonPatternList() const { |
- return pre_parser_->function_state_->non_patterns_to_rewrite(); |
+PreParserExpression PreParserTraits::RewriteNonPatternObjectLiteralProperty( |
+ PreParserExpression property, const ExpressionClassifier* classifier, |
+ bool* ok) { |
+ pre_parser_->ValidateExpression(classifier, ok); |
+ return property; |
} |