Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1043)

Unified Diff: src/parsing/expression-classifier.h

Issue 2267223002: [cleanup] Eliminate Forgive* methods on ExpressionClassifier (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move Pattern production logic around Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/parsing/parser-base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/expression-classifier.h
diff --git a/src/parsing/expression-classifier.h b/src/parsing/expression-classifier.h
index 7603cb54eb1cb521cfbf9012f6793bb9d83c9aaf..9190e18c7dc7ffe5f4026190f2ff2abacc25d203 100644
--- a/src/parsing/expression-classifier.h
+++ b/src/parsing/expression-classifier.h
@@ -311,20 +311,6 @@ class ExpressionClassifier {
Add(Error(loc, message, kTailCallExpressionProduction, arg));
}
- void ForgiveObjectLiteralError() {
- if (!(invalid_productions_ & ObjectLiteralProduction)) return;
- Error& e = reported_error(kObjectLiteralProduction);
- e.kind = kUnusedError;
- invalid_productions_ &= ~ObjectLiteralProduction;
- }
-
- void ForgiveAssignmentPatternError() {
- if (!(invalid_productions_ & AssignmentPatternProduction)) return;
- Error& e = reported_error(kAssignmentPatternProduction);
- e.kind = kUnusedError;
- invalid_productions_ &= ~AssignmentPatternProduction;
- }
-
void Accumulate(ExpressionClassifier* inner, unsigned productions,
bool merge_non_patterns = true) {
DCHECK_EQ(inner->reported_errors_, reported_errors_);
@@ -413,7 +399,7 @@ class ExpressionClassifier {
}
private:
- V8_INLINE Error& reported_error(ErrorKind kind) const {
+ V8_INLINE const Error& reported_error(ErrorKind kind) const {
if (invalid_productions_ & (1 << kind)) {
for (int i = reported_errors_begin_; i < reported_errors_end_; i++) {
if (reported_errors_->at(i).kind == kind)
« no previous file with comments | « no previous file | src/parsing/parser-base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698