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

Unified Diff: src/parser.h

Issue 8417035: Introduce extended mode. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed more comments. Created 9 years, 1 month 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/objects-inl.h ('k') | src/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.h
diff --git a/src/parser.h b/src/parser.h
index 588624b279d18cd325cec52fd5754b1f95641be3..e55c158fc2881152a8542b120823e395a2eb253e 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -72,7 +72,7 @@ class FunctionEntry BASE_EMBEDDED {
kEndPositionIndex,
kLiteralCountIndex,
kPropertyCountIndex,
- kStrictModeIndex,
+ kLanguageModeIndex,
kSize
};
@@ -83,10 +83,11 @@ class FunctionEntry BASE_EMBEDDED {
int end_pos() { return backing_[kEndPositionIndex]; }
int literal_count() { return backing_[kLiteralCountIndex]; }
int property_count() { return backing_[kPropertyCountIndex]; }
- StrictModeFlag strict_mode_flag() {
- ASSERT(backing_[kStrictModeIndex] == kStrictMode ||
- backing_[kStrictModeIndex] == kNonStrictMode);
- return static_cast<StrictModeFlag>(backing_[kStrictModeIndex]);
+ LanguageMode language_mode() {
+ ASSERT(backing_[kLanguageModeIndex] == CLASSIC_MODE ||
+ backing_[kLanguageModeIndex] == STRICT_MODE ||
+ backing_[kLanguageModeIndex] == EXTENDED_MODE);
+ return static_cast<LanguageMode>(backing_[kLanguageModeIndex]);
}
bool is_valid() { return !backing_.is_empty(); }
@@ -432,7 +433,7 @@ class Parser {
// Returns NULL if parsing failed.
FunctionLiteral* ParseProgram(Handle<String> source,
bool in_global_context,
- StrictModeFlag strict_mode);
+ LanguageMode language_mode);
FunctionLiteral* ParseLazy(CompilationInfo* info);
@@ -482,7 +483,7 @@ class Parser {
// Called by ParseProgram after setting up the scanner.
FunctionLiteral* DoParseProgram(Handle<String> source,
bool in_global_context,
- StrictModeFlag strict_mode,
+ LanguageMode language_mode,
ZoneScope* zone_scope);
// Report syntax error
« no previous file with comments | « src/objects-inl.h ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698