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

Unified Diff: src/parser.cc

Issue 1041863002: Use counter for legacy const. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Ready for review Created 5 years, 9 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 | « include/v8.h ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index 8ed20ee2121cfec8d313b042ac5ea878e66be628..7ab9be2fefed678e4234af649591bc8dffcfc3be 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -2272,6 +2272,7 @@ Block* Parser::ParseVariableDeclarations(
if (is_sloppy(language_mode())) {
mode = CONST_LEGACY;
init_op = Token::INIT_CONST_LEGACY;
+ ++use_counts_[v8::Isolate::kLegacyConst];
adamk 2015/03/31 18:19:32 Counting each const in a script separately seems a
} else {
DCHECK(var_context != kStatement);
mode = CONST;
« no previous file with comments | « include/v8.h ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698