Commit 14f4f8fc authored by nikolaos's avatar nikolaos Committed by Commit bot

Remove unnecessary RewriteNonPatternArguments

ParseArguments already does the rewriting.

R=rossberg@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1617733002

Cr-Commit-Position: refs/heads/master@{#33441}
parent 37ff07ec
...@@ -4895,7 +4895,6 @@ Expression* Parser::ParseV8Intrinsic(bool* ok) { ...@@ -4895,7 +4895,6 @@ Expression* Parser::ParseV8Intrinsic(bool* ok) {
ExpressionClassifier classifier; ExpressionClassifier classifier;
ZoneList<Expression*>* args = ZoneList<Expression*>* args =
ParseArguments(&spread_pos, &classifier, CHECK_OK); ParseArguments(&spread_pos, &classifier, CHECK_OK);
args = RewriteNonPatternArguments(args, &classifier, CHECK_OK);
DCHECK(!spread_pos.IsValid()); DCHECK(!spread_pos.IsValid());
...@@ -5464,13 +5463,6 @@ Expression* ParserTraits::RewriteNonPattern( ...@@ -5464,13 +5463,6 @@ Expression* ParserTraits::RewriteNonPattern(
} }
ZoneList<Expression*>* ParserTraits::RewriteNonPatternArguments(
ZoneList<Expression*>* args, const ExpressionClassifier* classifier,
bool* ok) {
return parser_->RewriteNonPatternArguments(args, classifier, ok);
}
ObjectLiteralProperty* ParserTraits::RewriteNonPatternObjectLiteralProperty( ObjectLiteralProperty* ParserTraits::RewriteNonPatternObjectLiteralProperty(
ObjectLiteralProperty* property, const ExpressionClassifier* classifier, ObjectLiteralProperty* property, const ExpressionClassifier* classifier,
bool* ok) { bool* ok) {
...@@ -5522,22 +5514,6 @@ Expression* Parser::RewriteNonPattern(Expression* expr, ...@@ -5522,22 +5514,6 @@ Expression* Parser::RewriteNonPattern(Expression* expr,
} }
ZoneList<Expression*>* Parser::RewriteNonPatternArguments(
ZoneList<Expression*>* args, const ExpressionClassifier* classifier,
bool* ok) {
ValidateExpression(classifier, ok);
if (!*ok) return args;
for (int i = 0; i < args->length(); i++) {
NonPatternRewriter rewriter(stack_limit_, this);
Expression* result =
reinterpret_cast<Expression*>(rewriter.Rewrite(args->at(i)));
DCHECK_NOT_NULL(result);
args->Set(i, result);
}
return args;
}
ObjectLiteralProperty* Parser::RewriteNonPatternObjectLiteralProperty( ObjectLiteralProperty* Parser::RewriteNonPatternObjectLiteralProperty(
ObjectLiteralProperty* property, const ExpressionClassifier* classifier, ObjectLiteralProperty* property, const ExpressionClassifier* classifier,
bool* ok) { bool* ok) {
......
...@@ -652,9 +652,6 @@ class ParserTraits { ...@@ -652,9 +652,6 @@ class ParserTraits {
// Rewrite expressions that are not used as patterns // Rewrite expressions that are not used as patterns
V8_INLINE Expression* RewriteNonPattern( V8_INLINE Expression* RewriteNonPattern(
Expression* expr, const ExpressionClassifier* classifier, bool* ok); Expression* expr, const ExpressionClassifier* classifier, bool* ok);
V8_INLINE ZoneList<Expression*>* RewriteNonPatternArguments(
ZoneList<Expression*>* args, const ExpressionClassifier* classifier,
bool* ok);
V8_INLINE ObjectLiteralProperty* RewriteNonPatternObjectLiteralProperty( V8_INLINE ObjectLiteralProperty* RewriteNonPatternObjectLiteralProperty(
ObjectLiteralProperty* property, const ExpressionClassifier* classifier, ObjectLiteralProperty* property, const ExpressionClassifier* classifier,
bool* ok); bool* ok);
...@@ -1021,9 +1018,6 @@ class Parser : public ParserBase<ParserTraits> { ...@@ -1021,9 +1018,6 @@ class Parser : public ParserBase<ParserTraits> {
V8_INLINE Expression* RewriteNonPattern( V8_INLINE Expression* RewriteNonPattern(
Expression* expr, const ExpressionClassifier* classifier, bool* ok); Expression* expr, const ExpressionClassifier* classifier, bool* ok);
V8_INLINE ZoneList<Expression*>* RewriteNonPatternArguments(
ZoneList<Expression*>* args, const ExpressionClassifier* classifier,
bool* ok);
V8_INLINE ObjectLiteralProperty* RewriteNonPatternObjectLiteralProperty( V8_INLINE ObjectLiteralProperty* RewriteNonPatternObjectLiteralProperty(
ObjectLiteralProperty* property, const ExpressionClassifier* classifier, ObjectLiteralProperty* property, const ExpressionClassifier* classifier,
bool* ok); bool* ok);
......
...@@ -936,9 +936,6 @@ class PreParserTraits { ...@@ -936,9 +936,6 @@ class PreParserTraits {
inline PreParserExpression RewriteNonPattern( inline PreParserExpression RewriteNonPattern(
PreParserExpression expr, const ExpressionClassifier* classifier, PreParserExpression expr, const ExpressionClassifier* classifier,
bool* ok); bool* ok);
inline PreParserExpression RewriteNonPatternArguments(
PreParserExpression args, const ExpressionClassifier* classifier,
bool* ok);
inline PreParserExpression RewriteNonPatternObjectLiteralProperty( inline PreParserExpression RewriteNonPatternObjectLiteralProperty(
PreParserExpression property, const ExpressionClassifier* classifier, PreParserExpression property, const ExpressionClassifier* classifier,
bool* ok); bool* ok);
...@@ -1132,14 +1129,6 @@ PreParserExpression PreParserTraits::RewriteNonPattern( ...@@ -1132,14 +1129,6 @@ PreParserExpression PreParserTraits::RewriteNonPattern(
} }
PreParserExpression PreParserTraits::RewriteNonPatternArguments(
PreParserExpression args, const ExpressionClassifier* classifier,
bool* ok) {
pre_parser_->ValidateExpression(classifier, ok);
return args;
}
PreParserExpression PreParserTraits::RewriteNonPatternObjectLiteralProperty( PreParserExpression PreParserTraits::RewriteNonPatternObjectLiteralProperty(
PreParserExpression property, const ExpressionClassifier* classifier, PreParserExpression property, const ExpressionClassifier* classifier,
bool* ok) { bool* ok) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment