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

Unified Diff: src/messages.h

Issue 1757543003: Restrict FunctionDeclarations in Statement position (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: git cl format Created 4 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/flag-definitions.h ('k') | src/parsing/parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/messages.h
diff --git a/src/messages.h b/src/messages.h
index c090888c212b0af1635dbd0805ad4cb9e3501c78..b7ccd502ed694ef9c0ca3ea7bae088b317f79b63 100644
--- a/src/messages.h
+++ b/src/messages.h
@@ -422,6 +422,9 @@ class CallSite {
T(ParenthesisInArgString, "Function arg string contains parenthesis") \
T(RuntimeWrongNumArgs, "Runtime function given wrong number of arguments") \
T(SingleFunctionLiteral, "Single function literal required") \
+ T(SloppyFunction, \
+ "In non-strict mode code, functions can only be declared at top level, " \
+ "inside a block, or as the body of an if statement.") \
T(SloppyLexical, \
"Block-scoped declarations (let, const, function, class) not yet " \
"supported outside strict mode") \
« no previous file with comments | « src/flag-definitions.h ('k') | src/parsing/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698