Support strict mode detection in the pre-scanner. (#3450)

Furthermode an error is thrown when 'use strict' is used in a function with non-simple arguments
and function arguments are not moved to lexical environment when unmapped arguments are present.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2019-12-17 10:59:03 +01:00
committed by Robert Fancsik
parent b1237dbc5a
commit 3c0beaf87d
9 changed files with 305 additions and 138 deletions
+1
View File
@@ -75,6 +75,7 @@ typedef enum
PARSER_ERR_EVAL_NOT_ALLOWED, /**< eval is not allowed here in strict mode */
PARSER_ERR_ARGUMENTS_NOT_ALLOWED, /**< arguments is not allowed here in strict mode */
#if ENABLED (JERRY_ES2015)
PARSER_ERR_USE_STRICT_NOT_ALLOWED, /**< use strict directive is not allowed */
PARSER_ERR_YIELD_NOT_ALLOWED, /**< yield keyword is not allowed */
#endif /* ENABLED (JERRY_ES2015) */
PARSER_ERR_DELETE_IDENT_NOT_ALLOWED, /**< identifier delete is not allowed in strict mode */