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

Unified Diff: src/parsing/parser-base.h

Issue 2599253002: [counters] Add UseCounters for 'f() = 0' syntax (Closed)
Patch Set: Created 4 years 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
Index: src/parsing/parser-base.h
diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h
index 6e407eef6d765e5dfc2e7012728b6019f1976955..93f1a9a70e1511c2dfacaf9624f5624de35baaec 100644
--- a/src/parsing/parser-base.h
+++ b/src/parsing/parser-base.h
@@ -4332,6 +4332,10 @@ ParserBase<Impl>::CheckAndRewriteReferenceExpression(
if (expression->IsCall()) {
// If it is a call, make it a runtime error for legacy web compatibility.
// Rewrite `expr' to `expr[throw ReferenceError]'.
Dan Ehrenberg 2016/12/23 07:56:52 Could you put a reference to https://bugs.chromium
bakkot1 2016/12/23 09:41:53 Done.
+ impl()->CountUsage(
+ is_strict(language_mode())
Dan Ehrenberg 2016/12/23 07:56:52 Aren't you glad we don't have strong mode?
+ ? v8::Isolate::kAssigmentExpressionLHSIsCallInStrict
+ : v8::Isolate::kAssigmentExpressionLHSIsCallInNonstrict);
ExpressionT error = impl()->NewThrowReferenceError(message, beg_pos);
return factory()->NewProperty(expression, error, beg_pos);
}
« include/v8.h ('K') | « include/v8.h ('k') | test/cctest/test-usecounters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698