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

Unified Diff: src/full-codegen.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/factory.cc ('k') | src/full-codegen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen.h
diff --git a/src/full-codegen.h b/src/full-codegen.h
index 2c12da4c2c66e12956574fc68150b5d2602eb853..ce691c37e19f88806e3b2c72db419f4b51535c9a 100644
--- a/src/full-codegen.h
+++ b/src/full-codegen.h
@@ -603,11 +603,11 @@ class FullCodeGenerator: public AstVisitor {
// Shall an error be thrown if assignment with 'op' operation is perfomed
// on this variable in given language mode?
static bool IsSignallingAssignmentToConst(Variable* var, Token::Value op,
- StrictMode strict_mode) {
+ LanguageMode language_mode) {
if (var->mode() == CONST) return op != Token::INIT_CONST;
if (var->mode() == CONST_LEGACY) {
- return strict_mode == STRICT && op != Token::INIT_CONST_LEGACY;
+ return is_strict(language_mode) && op != Token::INIT_CONST_LEGACY;
}
return false;
@@ -686,7 +686,7 @@ class FullCodeGenerator: public AstVisitor {
Handle<Script> script() { return info_->script(); }
bool is_eval() { return info_->is_eval(); }
bool is_native() { return info_->is_native(); }
- StrictMode strict_mode() { return function()->strict_mode(); }
+ LanguageMode language_mode() { return function()->language_mode(); }
FunctionLiteral* function() { return info_->function(); }
Scope* scope() { return scope_; }
« no previous file with comments | « src/factory.cc ('k') | src/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698