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

Unified Diff: src/preparser.h

Issue 8407002: Version 3.7.2 (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 9 years, 2 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/preparse-data.h ('k') | src/preparser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.h
===================================================================
--- src/preparser.h (revision 9809)
+++ src/preparser.h (working copy)
@@ -408,16 +408,6 @@
typedef int Arguments;
- // The Strict Mode (ECMA-262 5th edition, 4.2.2).
- enum StrictModeFlag {
- kNonStrictMode,
- kStrictMode,
- // This value is never used, but is needed to prevent GCC 4.5 from failing
- // to compile when we assert that a flag is either kNonStrictMode or
- // kStrictMode.
- kInvalidStrictFlag
- };
-
class Scope {
public:
Scope(Scope** variable, ScopeType type)
@@ -428,7 +418,7 @@
expected_properties_(0),
with_nesting_count_(0),
strict_mode_flag_((prev_ != NULL) ? prev_->strict_mode_flag()
- : kNonStrictMode) {
+ : i::kNonStrictMode) {
*variable = this;
}
~Scope() { *variable_ = prev_; }
@@ -438,11 +428,11 @@
int expected_properties() { return expected_properties_; }
int materialized_literal_count() { return materialized_literal_count_; }
bool IsInsideWith() { return with_nesting_count_ != 0; }
- bool is_strict_mode() { return strict_mode_flag_ == kStrictMode; }
- StrictModeFlag strict_mode_flag() {
+ bool is_strict_mode() { return strict_mode_flag_ == i::kStrictMode; }
+ i::StrictModeFlag strict_mode_flag() {
return strict_mode_flag_;
}
- void set_strict_mode_flag(StrictModeFlag strict_mode_flag) {
+ void set_strict_mode_flag(i::StrictModeFlag strict_mode_flag) {
strict_mode_flag_ = strict_mode_flag;
}
void EnterWith() { with_nesting_count_++; }
@@ -455,7 +445,7 @@
int materialized_literal_count_;
int expected_properties_;
int with_nesting_count_;
- StrictModeFlag strict_mode_flag_;
+ i::StrictModeFlag strict_mode_flag_;
};
// Private constructor only used in PreParseProgram.
@@ -591,11 +581,13 @@
bool peek_any_identifier();
void set_strict_mode() {
- scope_->set_strict_mode_flag(kStrictMode);
+ scope_->set_strict_mode_flag(i::kStrictMode);
}
- bool strict_mode() { return scope_->strict_mode_flag() == kStrictMode; }
+ bool strict_mode() { return scope_->strict_mode_flag() == i::kStrictMode; }
+ i::StrictModeFlag strict_mode_flag() { return scope_->strict_mode_flag(); }
+
void Consume(i::Token::Value token) { Next(); }
void Expect(i::Token::Value token, bool* ok) {
« no previous file with comments | « src/preparse-data.h ('k') | src/preparser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698