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

Unified Diff: src/preparse-data.h

Issue 1281163002: [parser] partially revert "use-strict directives in function body affect init block" Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/preparser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparse-data.h
diff --git a/src/preparse-data.h b/src/preparse-data.h
index f7ed1ed91ad686aab2b7523ed75c4ef9461719b8..ec78347b3cf073d701e879779ccfb964a106a96d 100644
--- a/src/preparse-data.h
+++ b/src/preparse-data.h
@@ -54,7 +54,7 @@ class ParserRecorder {
// Logs the scope and some details of a function literal in the source.
virtual void LogFunction(int start, int end, int literals, int properties,
LanguageMode language_mode, bool uses_super_property,
- bool calls_eval) = 0;
+ bool calls_eval, bool has_simple_parameters) = 0;
// Logs an error message and marks the log as containing an error.
// Further logging will be ignored, and ExtractData will return a vector
@@ -78,7 +78,7 @@ class SingletonLogger : public ParserRecorder {
virtual void LogFunction(int start, int end, int literals, int properties,
LanguageMode language_mode, bool uses_super_property,
- bool calls_eval) {
+ bool calls_eval, bool has_simple_parameters) {
DCHECK(!has_error_);
start_ = start;
end_ = end;
@@ -87,6 +87,7 @@ class SingletonLogger : public ParserRecorder {
language_mode_ = language_mode;
uses_super_property_ = uses_super_property;
calls_eval_ = calls_eval;
+ has_simple_parameters_ = has_simple_parameters;
}
// Logs an error message and marks the log as containing an error.
@@ -127,6 +128,10 @@ class SingletonLogger : public ParserRecorder {
DCHECK(!has_error_);
return calls_eval_;
}
+ bool has_simple_parameters() const {
+ DCHECK(!has_error_);
+ return has_simple_parameters_;
+ }
ParseErrorType error_type() const {
DCHECK(has_error_);
return error_type_;
@@ -150,6 +155,7 @@ class SingletonLogger : public ParserRecorder {
LanguageMode language_mode_;
bool uses_super_property_;
bool calls_eval_;
+ bool has_simple_parameters_;
// For error messages.
MessageTemplate::Template message_;
const char* argument_opt_;
@@ -169,7 +175,7 @@ class CompleteParserRecorder : public ParserRecorder {
virtual void LogFunction(int start, int end, int literals, int properties,
LanguageMode language_mode, bool uses_super_property,
- bool calls_eval) {
+ bool calls_eval, bool has_simple_parameters) {
function_store_.Add(start);
function_store_.Add(end);
function_store_.Add(literals);
@@ -177,6 +183,7 @@ class CompleteParserRecorder : public ParserRecorder {
function_store_.Add(language_mode);
function_store_.Add(uses_super_property);
function_store_.Add(calls_eval);
+ function_store_.Add(has_simple_parameters);
}
// Logs an error message and marks the log as containing an error.
« no previous file with comments | « src/parser.cc ('k') | src/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698