Implement the for of statement (#2871)

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2019-06-07 06:35:42 -04:00
committed by Dániel Bátyai
parent b6fc4e13ae
commit 343e80053b
15 changed files with 530 additions and 48 deletions
+10
View File
@@ -79,6 +79,16 @@ vm_stack_context_abort (vm_frame_ctx_t *frame_ctx_p, /**< frame context */
vm_stack_top_p -= PARSER_WITH_CONTEXT_STACK_ALLOCATION;
break;
}
#if ENABLED (JERRY_ES2015_FOR_OF)
case VM_CONTEXT_FOR_OF:
{
ecma_free_value (vm_stack_top_p[-2]);
ecma_free_value (vm_stack_top_p[-3]);
VM_MINUS_EQUAL_U16 (frame_ctx_p->context_depth, PARSER_FOR_OF_CONTEXT_STACK_ALLOCATION);
vm_stack_top_p -= PARSER_FOR_OF_CONTEXT_STACK_ALLOCATION;
break;
}
#endif /* ENABLED (JERRY_ES2015_FOR_OF) */
default:
{
JERRY_ASSERT (VM_GET_CONTEXT_TYPE (vm_stack_top_p[-1]) == VM_CONTEXT_FOR_IN);