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

Unified Diff: src/parsing/parser-base.h

Issue 1702853002: [cleanup] add Parser accessors for FLAG_harmony_function_sent (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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 | « src/parsing/parser.cc ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser-base.h
diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h
index 8922c7e282e84906a57ff6f737303f9e35e78c3a..6bee72b14164154d6b723fb2a368c1552680c2ad 100644
--- a/src/parsing/parser-base.h
+++ b/src/parsing/parser-base.h
@@ -116,7 +116,8 @@ class ParserBase : public Traits {
allow_strong_mode_(false),
allow_legacy_const_(true),
allow_harmony_do_expressions_(false),
- allow_harmony_function_name_(false) {}
+ allow_harmony_function_name_(false),
+ allow_harmony_function_sent_(false) {}
#define ALLOW_ACCESSORS(name) \
bool allow_##name() const { return allow_##name##_; } \
@@ -134,6 +135,7 @@ class ParserBase : public Traits {
ALLOW_ACCESSORS(legacy_const);
ALLOW_ACCESSORS(harmony_do_expressions);
ALLOW_ACCESSORS(harmony_function_name);
+ ALLOW_ACCESSORS(harmony_function_sent);
#undef ALLOW_ACCESSORS
uintptr_t stack_limit() const { return stack_limit_; }
@@ -947,6 +949,7 @@ class ParserBase : public Traits {
bool allow_legacy_const_;
bool allow_harmony_do_expressions_;
bool allow_harmony_function_name_;
+ bool allow_harmony_function_sent_;
};
template <class Traits>
@@ -2543,7 +2546,7 @@ ParserBase<Traits>::ParseMemberExpression(ExpressionClassifier* classifier,
Consume(Token::FUNCTION);
int function_token_position = position();
- if (FLAG_harmony_function_sent && peek() == Token::PERIOD) {
+ if (allow_harmony_function_sent() && peek() == Token::PERIOD) {
// function.sent
int pos = position();
ExpectMetaProperty(CStrVector("sent"), "function.sent", pos, CHECK_OK);
« no previous file with comments | « src/parsing/parser.cc ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698