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) {
ExpressionClassifier classifier;
ZoneList<Expression*>* args =
ParseArguments(&spread_pos, &classifier, CHECK_OK);
args = RewriteNonPatternArguments(args, &classifier, CHECK_OK);
DCHECK(!spread_pos.IsValid());
......@@ -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* property, const ExpressionClassifier* classifier,
bool* ok) {
......@@ -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* property, const ExpressionClassifier* classifier,
bool* ok) {
......
......@@ -652,9 +652,6 @@ class ParserTraits {
// Rewrite expressions that are not used as patterns
V8_INLINE Expression* RewriteNonPattern(
Expression* expr, const ExpressionClassifier* classifier, bool* ok);
V8_INLINE ZoneList<Expression*>* RewriteNonPatternArguments(
ZoneList<Expression*>* args, const ExpressionClassifier* classifier,
bool* ok);
V8_INLINE ObjectLiteralProperty* RewriteNonPatternObjectLiteralProperty(
ObjectLiteralProperty* property, const ExpressionClassifier* classifier,
bool* ok);
......@@ -1021,9 +1018,6 @@ class Parser : public ParserBase<ParserTraits> {
V8_INLINE Expression* RewriteNonPattern(
Expression* expr, const ExpressionClassifier* classifier, bool* ok);
V8_INLINE ZoneList<Expression*>* RewriteNonPatternArguments(
ZoneList<Expression*>* args, const ExpressionClassifier* classifier,
bool* ok);
V8_INLINE ObjectLiteralProperty* RewriteNonPatternObjectLiteralProperty(
ObjectLiteralProperty* property, const ExpressionClassifier* classifier,
bool* ok);
......
......@@ -936,9 +936,6 @@ class PreParserTraits {
inline PreParserExpression RewriteNonPattern(
PreParserExpression expr, const ExpressionClassifier* classifier,
bool* ok);
inline PreParserExpression RewriteNonPatternArguments(
PreParserExpression args, const ExpressionClassifier* classifier,
bool* ok);
inline PreParserExpression RewriteNonPatternObjectLiteralProperty(
PreParserExpression property, const ExpressionClassifier* classifier,
bool* ok);
......@@ -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 property, const ExpressionClassifier* classifier,
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