Implement function destructuring argument support. (#3322)

Furthermore create unmapped arguments objects if a function has a non-simple argument.
A few destructuring pattern issues were 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
2019-11-18 14:15:36 +01:00
committed by Dániel Bátyai
parent 359643b5b2
commit 8bdb32cc88
19 changed files with 753 additions and 202 deletions
+2 -2
View File
@@ -346,7 +346,7 @@ ecma_save_literals_add_compiled_code (const ecma_compiled_code_t *compiled_code_
const_literal_end = args_p->const_literal_end - register_end;
literal_end = args_p->literal_end - register_end;
if (CBC_NON_STRICT_ARGUMENTS_NEEDED (compiled_code_p))
if (compiled_code_p->status_flags & CBC_CODE_FLAGS_MAPPED_ARGUMENTS_NEEDED)
{
argument_end = args_p->argument_end;
}
@@ -361,7 +361,7 @@ ecma_save_literals_add_compiled_code (const ecma_compiled_code_t *compiled_code_
const_literal_end = args_p->const_literal_end - register_end;
literal_end = args_p->literal_end - register_end;
if (CBC_NON_STRICT_ARGUMENTS_NEEDED (compiled_code_p))
if (compiled_code_p->status_flags & CBC_CODE_FLAGS_MAPPED_ARGUMENTS_NEEDED)
{
argument_end = args_p->argument_end;
}