Remove now-unused TailCallExpressionProduction from ExpressionClassifier

R=ishell@chromium.org

Review-Url: https://codereview.chromium.org/2395003002
Cr-Commit-Position: refs/heads/master@{#40053}
This commit is contained in:
adamk 2016-10-06 10:53:16 -07:00 committed by Commit bot
parent 88702e08bc
commit 549690f2bf
2 changed files with 2 additions and 19 deletions

View File

@ -22,8 +22,7 @@ class DuplicateFinder;
T(StrictModeFormalParametersProduction, 5) \
T(ArrowFormalParametersProduction, 6) \
T(LetPatternProduction, 7) \
T(TailCallExpressionProduction, 8) \
T(AsyncArrowFormalParametersProduction, 9)
T(AsyncArrowFormalParametersProduction, 8)
// Expression classifiers serve two purposes:
//
@ -191,13 +190,6 @@ class ExpressionClassifier {
return reported_error(kLetPatternProduction);
}
V8_INLINE bool has_tail_call_expression() const {
return !is_valid(TailCallExpressionProduction);
}
V8_INLINE const Error& tail_call_expression_error() const {
return reported_error(kTailCallExpressionProduction);
}
V8_INLINE const Error& async_arrow_formal_parameters_error() const {
return reported_error(kAsyncArrowFormalParametersProduction);
}
@ -299,14 +291,6 @@ class ExpressionClassifier {
Add(Error(loc, message, kLetPatternProduction, arg));
}
void RecordTailCallExpressionError(const Scanner::Location& loc,
MessageTemplate::Template message,
const char* arg = nullptr) {
if (has_tail_call_expression()) return;
invalid_productions_ |= TailCallExpressionProduction;
Add(Error(loc, message, kTailCallExpressionProduction, arg));
}
void Accumulate(ExpressionClassifier* inner, unsigned productions,
bool merge_non_patterns = true) {
DCHECK_EQ(inner->reported_errors_, reported_errors_);

View File

@ -2722,8 +2722,7 @@ ParserBase<Impl>::ParseAssignmentExpression(bool accept_IN, bool* ok) {
if (is_destructuring_assignment) {
// This is definitely not an expression so don't accumulate
// expression-related errors.
productions &= ~(ExpressionClassifier::ExpressionProduction |
ExpressionClassifier::TailCallExpressionProduction);
productions &= ~ExpressionClassifier::ExpressionProduction;
}
if (!Token::IsAssignmentOp(peek())) {