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

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

Issue 2277843002: [parser] Clean up (pre)parser traits, part 5, last (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@nickie-2274113002-ref-traits
Patch Set: 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.h » ('j') | src/parsing/parser.h » ('J')
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 9190e18c7dc7ffe5f4026190f2ff2abacc25d203..b2dff74c247d59d2f20379954ab69bbaf5952af8 100644
--- a/src/parsing/expression-classifier.h
+++ b/src/parsing/expression-classifier.h
@@ -77,21 +77,11 @@ class ExpressionClassifier {
NonSimpleParameter = 1 << 0
};
- explicit ExpressionClassifier(const Traits* t)
- : zone_(t->zone()),
- non_patterns_to_rewrite_(t->GetNonPatternList()),
- reported_errors_(t->GetReportedErrorList()),
- duplicate_finder_(nullptr),
- invalid_productions_(0),
- function_properties_(0) {
- reported_errors_begin_ = reported_errors_end_ = reported_errors_->length();
- non_pattern_begin_ = non_patterns_to_rewrite_->length();
- }
-
- ExpressionClassifier(const Traits* t, DuplicateFinder* duplicate_finder)
- : zone_(t->zone()),
- non_patterns_to_rewrite_(t->GetNonPatternList()),
- reported_errors_(t->GetReportedErrorList()),
+ explicit ExpressionClassifier(const typename Traits::Type::Base* base,
+ DuplicateFinder* duplicate_finder = nullptr)
+ : zone_(base->impl()->zone()),
+ non_patterns_to_rewrite_(base->impl()->GetNonPatternList()),
+ reported_errors_(base->impl()->GetReportedErrorList()),
duplicate_finder_(duplicate_finder),
invalid_productions_(0),
function_properties_(0) {
« no previous file with comments | « no previous file | src/parsing/parser.h » ('j') | src/parsing/parser.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698