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

Unified Diff: src/preparse-data.h

Issue 894683003: Introduce LanguageMode, drop StrictMode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased (w/ conflicts) Created 5 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/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 c1331d044fcfd6148cd9dbb30846c76e3fc1d8bb..d06c00b63b679b8fb5895f656696b484400847c5 100644
--- a/src/preparse-data.h
+++ b/src/preparse-data.h
@@ -23,11 +23,8 @@ class ParserRecorder {
virtual ~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,
- StrictMode strict_mode) = 0;
+ virtual void LogFunction(int start, int end, int literals, int properties,
+ LanguageMode language_mode) = 0;
// Logs an error message and marks the log as containing an error.
// Further logging will be ignored, and ExtractData will return a vector
@@ -50,17 +47,14 @@ class SingletonLogger : public ParserRecorder {
void Reset() { has_error_ = false; }
- virtual void LogFunction(int start,
- int end,
- int literals,
- int properties,
- StrictMode strict_mode) {
+ virtual void LogFunction(int start, int end, int literals, int properties,
+ LanguageMode language_mode) {
DCHECK(!has_error_);
start_ = start;
end_ = end;
literals_ = literals;
properties_ = properties;
- strict_mode_ = strict_mode;
+ language_mode_ = language_mode;
}
// Logs an error message and marks the log as containing an error.
@@ -92,9 +86,9 @@ class SingletonLogger : public ParserRecorder {
DCHECK(!has_error_);
return properties_;
}
- StrictMode strict_mode() const {
+ LanguageMode language_mode() const {
DCHECK(!has_error_);
- return strict_mode_;
+ return language_mode_;
}
int is_reference_error() const { return is_reference_error_; }
const char* message() {
@@ -113,7 +107,7 @@ class SingletonLogger : public ParserRecorder {
// For function entries.
int literals_;
int properties_;
- StrictMode strict_mode_;
+ LanguageMode language_mode_;
// For error messages.
const char* message_;
const char* argument_opt_;
@@ -131,16 +125,13 @@ class CompleteParserRecorder : public ParserRecorder {
CompleteParserRecorder();
virtual ~CompleteParserRecorder() {}
- virtual void LogFunction(int start,
- int end,
- int literals,
- int properties,
- StrictMode strict_mode) {
+ virtual void LogFunction(int start, int end, int literals, int properties,
+ LanguageMode language_mode) {
function_store_.Add(start);
function_store_.Add(end);
function_store_.Add(literals);
function_store_.Add(properties);
- function_store_.Add(strict_mode);
+ function_store_.Add(language_mode);
}
// 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