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

Unified Diff: src/preparser.h

Issue 1262913003: [es6] Remove Scanner and Parser flags for harmony_modules (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add flag-setting to cctests Created 5 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 | « src/parser.cc ('k') | src/scanner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.h
diff --git a/src/preparser.h b/src/preparser.h
index 3bd0953cb627122adaf0691918545a8034469ecb..6e34dfb620e7ac72d10886c778d7446b1121a5a2 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -130,10 +130,8 @@ class ParserBase : public Traits {
ALLOW_ACCESSORS(legacy_const);
#undef ALLOW_ACCESSORS
- bool allow_harmony_modules() const { return scanner()->HarmonyModules(); }
bool allow_harmony_unicode() const { return scanner()->HarmonyUnicode(); }
- void set_allow_harmony_modules(bool a) { scanner()->SetHarmonyModules(a); }
void set_allow_harmony_unicode(bool a) { scanner()->SetHarmonyUnicode(a); }
protected:
@@ -313,7 +311,7 @@ class ParserBase : public Traits {
Scope* NewScope(Scope* parent, ScopeType scope_type, FunctionKind kind) {
DCHECK(ast_value_factory());
- DCHECK(scope_type != MODULE_SCOPE || allow_harmony_modules());
+ DCHECK(scope_type != MODULE_SCOPE || FLAG_harmony_modules);
DCHECK(!IsArrowFunction(kind) || scope_type == ARROW_SCOPE);
Scope* result = new (zone())
Scope(zone(), parent, scope_type, ast_value_factory(), kind);
« no previous file with comments | « src/parser.cc ('k') | src/scanner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698