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

Unified Diff: src/full-codegen.h

Issue 976053002: Fix exception for assignment to uninitialised const (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comments 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/compiler/ast-graph-builder.cc ('k') | src/ia32/full-codegen-ia32.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 84eb02c94c95b86f00200b1f9d3ef2bd16466c60..42f2b2c9233561c7054551b73205b37f97c12eba 100644
--- a/src/full-codegen.h
+++ b/src/full-codegen.h
@@ -589,19 +589,6 @@ class FullCodeGenerator: public AstVisitor {
// is expected in the accumulator.
void EmitAssignment(Expression* expr);
- // 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,
- LanguageMode language_mode) {
- if (var->mode() == CONST) return op != Token::INIT_CONST;
-
- if (var->mode() == CONST_LEGACY) {
- return is_strict(language_mode) && op != Token::INIT_CONST_LEGACY;
- }
-
- return false;
- }
-
// Complete a variable assignment. The right-hand-side value is expected
// in the accumulator.
void EmitVariableAssignment(Variable* var,
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698