Support new Function parsing in the pre-scanner. (#3110)

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2019-09-16 11:58:15 +02:00
committed by Dániel Bátyai
parent 87441635e1
commit 62025cfa41
6 changed files with 111 additions and 37 deletions
+8 -6
View File
@@ -2465,12 +2465,11 @@ parser_parse_source (const uint8_t *arg_list_p, /**< function argument list */
}
#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */
context.source_p = source_p;
context.source_end_p = source_p + source_size;
context.line = 1;
context.column = 1;
scanner_scan_all (&context);
scanner_scan_all (&context,
arg_list_p,
arg_list_p + arg_list_size,
source_p,
source_p + source_size);
if (JERRY_UNLIKELY (context.error != PARSER_ERR_NO_ERROR))
{
@@ -2519,6 +2518,9 @@ parser_parse_source (const uint8_t *arg_list_p, /**< function argument list */
{
parser_parse_function_arguments (&context, LEXER_EOS);
JERRY_ASSERT (context.next_scanner_info_p->type == SCANNER_TYPE_END_ARGUMENTS);
scanner_release_next (&context, sizeof (scanner_info_t));
context.source_p = source_p;
context.source_end_p = source_p + source_size;
context.line = 1;