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

Unified Diff: src/ast.h

Issue 932283003: [strong] make function and class declarations lexical & immutable (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Adjusted assertion 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 | « no previous file | src/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index 42c8177251e89824f04003e0905703f1c34fac9c..faccb90457675627e553b42291f40c75b26b9dce 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -577,8 +577,7 @@ class FunctionDeclaration FINAL : public Declaration {
int pos)
: Declaration(zone, proxy, mode, scope, pos),
fun_(fun) {
- // At the moment there are no "const functions" in JavaScript...
- DCHECK(mode == VAR || mode == LET);
+ DCHECK(mode == VAR || mode == LET || mode == CONST);
DCHECK(fun != NULL);
}
« no previous file with comments | « no previous file | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698