Fix function argument handling issues caused by the parser. (#3705)

1) Nested function declarations should not overwrite arguments.
2) Functions should be created in the correct scope.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2020-05-04 14:55:46 +02:00
committed by GitHub
parent 40a9f27314
commit 132a2008c9
6 changed files with 135 additions and 23 deletions
+3 -2
View File
@@ -392,9 +392,10 @@ typedef struct
#define PARSER_SCOPE_STACK_REGISTER_MASK 0x3fff
/**
* The scope stack item represents a lexical declaration (let/const)
* Function statements with the name specified
* in map_from should not be copied to global scope.
*/
#define PARSER_SCOPE_STACK_IS_LEXICAL 0x4000
#define PARSER_SCOPE_STACK_NO_FUNCTION_COPY 0x4000
/**
* The scope stack item represents a const declaration