| Index: src/preparse-data.h
|
| diff --git a/src/preparse-data.h b/src/preparse-data.h
|
| index e216cffd8268224d3c192b2101e03ffcf167d5c5..5941e7bf7f682fa983cd3e8318142ce8e67d7e55 100644
|
| --- a/src/preparse-data.h
|
| +++ b/src/preparse-data.h
|
| @@ -25,7 +25,8 @@ 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) = 0;
|
| + bool scope_uses_super_property,
|
| + bool scope_uses_new_target) = 0;
|
|
|
| // Logs an error message and marks the log as containing an error.
|
| // Further logging will be ignored, and ExtractData will return a vector
|
| @@ -49,7 +50,8 @@ class SingletonLogger : public ParserRecorder {
|
|
|
| virtual void LogFunction(int start, int end, int literals, int properties,
|
| LanguageMode language_mode,
|
| - bool scope_uses_super_property) {
|
| + bool scope_uses_super_property,
|
| + bool scope_uses_new_target) {
|
| DCHECK(!has_error_);
|
| start_ = start;
|
| end_ = end;
|
| @@ -57,6 +59,7 @@ class SingletonLogger : public ParserRecorder {
|
| properties_ = properties;
|
| language_mode_ = language_mode;
|
| scope_uses_super_property_ = scope_uses_super_property;
|
| + scope_uses_new_target_ = scope_uses_new_target;
|
| }
|
|
|
| // Logs an error message and marks the log as containing an error.
|
| @@ -93,6 +96,10 @@ class SingletonLogger : public ParserRecorder {
|
| DCHECK(!has_error_);
|
| return scope_uses_super_property_;
|
| }
|
| + bool scope_uses_new_target() const {
|
| + DCHECK(!has_error_);
|
| + return scope_uses_new_target_;
|
| + }
|
| ParseErrorType error_type() const {
|
| DCHECK(has_error_);
|
| return error_type_;
|
| @@ -115,6 +122,7 @@ class SingletonLogger : public ParserRecorder {
|
| int properties_;
|
| LanguageMode language_mode_;
|
| bool scope_uses_super_property_;
|
| + bool scope_uses_new_target_;
|
| // For error messages.
|
| const char* message_;
|
| const char* argument_opt_;
|
| @@ -134,13 +142,15 @@ class CompleteParserRecorder : public ParserRecorder {
|
|
|
| virtual void LogFunction(int start, int end, int literals, int properties,
|
| LanguageMode language_mode,
|
| - bool scope_uses_super_property) {
|
| + bool scope_uses_super_property,
|
| + bool scope_uses_new_target) {
|
| function_store_.Add(start);
|
| function_store_.Add(end);
|
| function_store_.Add(literals);
|
| function_store_.Add(properties);
|
| function_store_.Add(language_mode);
|
| function_store_.Add(scope_uses_super_property);
|
| + function_store_.Add(scope_uses_new_target);
|
| }
|
|
|
| // Logs an error message and marks the log as containing an error.
|
|
|