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