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
@@ -649,6 +649,8 @@ bool lexer_compare_identifier_to_string (const lexer_lit_location_t *left_p, con
bool lexer_compare_identifiers (parser_context_t *context_p, const lexer_lit_location_t *left_p,
const lexer_lit_location_t *right_p);
bool lexer_current_is_literal (parser_context_t *context_p, const lexer_lit_location_t *right_ident_p);
bool lexer_string_is_use_strict (parser_context_t *context_p);
bool lexer_string_is_directive (parser_context_t *context_p);
#if ENABLED (JERRY_ES2015)
bool lexer_token_is_identifier (parser_context_t *context_p, const char *identifier_p,
size_t identifier_length);