Implement proper function length support (#4290)

Comma after last destructuring argument has been fixed as well

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2020-10-19 10:55:26 +02:00
committed by GitHub
parent 9da1211e26
commit f384642409
10 changed files with 157 additions and 130 deletions
@@ -504,6 +504,9 @@ typedef struct parser_saved_context_t
/* Literal types */
uint16_t argument_count; /**< number of function arguments */
#if ENABLED (JERRY_ESNEXT)
uint16_t argument_length; /**< length property of arguments */
#endif /* ENABLED (JERRY_ESNEXT) */
uint16_t register_count; /**< number of registers */
uint16_t literal_count; /**< number of literals */
@@ -574,6 +577,9 @@ typedef struct
/* Literal types */
uint16_t argument_count; /**< number of function arguments */
#if ENABLED (JERRY_ESNEXT)
uint16_t argument_length; /**< length property of arguments */
#endif /* ENABLED (JERRY_ESNEXT) */
uint16_t register_count; /**< number of registers */
uint16_t literal_count; /**< number of literals */