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

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

Issue 2193793002: Put Scopes into temporary Zone (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: . Created 4 years, 5 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
Index: src/parsing/parser-base.h
diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h
index 000b606a9549570b50ca9429633a5d88e6dbbf3f..14d185718c55810876357d4b0780f7edd63b6d17 100644
--- a/src/parsing/parser-base.h
+++ b/src/parsing/parser-base.h
@@ -446,7 +446,11 @@ class ParserBase : public Traits {
return &non_patterns_to_rewrite_;
}
- void next_function_is_parenthesized(bool parenthesized) {
+ bool next_function_is_parenthesized() const {
+ return next_function_is_parenthesized_;
+ }
+
+ void set_next_function_is_parenthesized(bool parenthesized) {
next_function_is_parenthesized_ = parenthesized;
}
@@ -1221,6 +1225,8 @@ class ParserBase : public Traits {
bool allow_harmony_async_await_;
bool allow_harmony_restrictive_generators_;
bool allow_harmony_trailing_commas_;
+
+ friend class DiscardableZoneScope;
};
template <class Traits>
@@ -1615,8 +1621,8 @@ ParserBase<Traits>::ParsePrimaryExpression(ExpressionClassifier* classifier,
}
// Heuristically try to detect immediately called functions before
// seeing the call parentheses.
- function_state_->next_function_is_parenthesized(peek() ==
- Token::FUNCTION);
+ function_state_->set_next_function_is_parenthesized(peek() ==
+ Token::FUNCTION);
ExpressionT expr = this->ParseExpression(true, classifier, CHECK_OK);
Expect(Token::RPAREN, CHECK_OK);
return expr;

Powered by Google App Engine
This is Rietveld 408576698