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

Unified Diff: src/scopeinfo.cc

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/runtime.cc ('k') | src/scopes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scopeinfo.cc
diff --git a/src/scopeinfo.cc b/src/scopeinfo.cc
index 6ea92cee303afe0b1b2995903882f596028c16a6..cb89646b79dfc3d4279924abf167b687b4c53547 100644
--- a/src/scopeinfo.cc
+++ b/src/scopeinfo.cc
@@ -79,7 +79,7 @@ Handle<ScopeInfo> ScopeInfo::Create(Scope* scope) {
// Encode the flags.
int flags = TypeField::encode(scope->type()) |
CallsEvalField::encode(scope->calls_eval()) |
- StrictModeField::encode(scope->is_strict_mode()) |
+ LanguageModeField::encode(scope->language_mode()) |
FunctionVariableField::encode(function_name_info) |
FunctionVariableMode::encode(function_variable_mode);
scope_info->SetFlags(flags);
@@ -163,8 +163,9 @@ bool ScopeInfo::CallsEval() {
}
-bool ScopeInfo::IsStrictMode() {
- return length() > 0 && StrictModeField::decode(Flags());
+LanguageMode ScopeInfo::language_mode() {
+ ASSERT(length() > 0);
+ return LanguageModeField::decode(Flags());
}
« no previous file with comments | « src/runtime.cc ('k') | src/scopes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698