Delay the variable construction in the function body. (#3289)

Local variables inside the function body should be constructed after the
parameters are initialized. Furthermore arguments should be available
during parameter initialization.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2019-11-08 12:18:23 +01:00
committed by Dániel Bátyai
parent 923fd128b5
commit e1fc90db0e
7 changed files with 223 additions and 92 deletions
+3 -4
View File
@@ -2632,12 +2632,11 @@ scan_completed:
if (info_p->type == SCANNER_TYPE_FUNCTION)
{
scanner_function_info_t *function_info_p = (scanner_function_info_t *) info_p;
data_p = (const uint8_t *) (function_info_p + 1);
data_p = (const uint8_t *) (info_p + 1);
JERRY_DEBUG_MSG (" FUNCTION: flags: 0x%x declarations: %d",
(int) function_info_p->info.u8_arg,
(int) function_info_p->info.u16_arg);
(int) info_p->u8_arg,
(int) info_p->u16_arg);
}
else
{