Rework the core of class parsing/runtime semantic (#3598)

Changes:
 - Use the pre-scanner to provide information for the parser about the existence of the class constructor
 - The allocation of the super declarative environment is no longer needed
 - The VM frame context holds the information about the this binding status
 - Reduce the number of class related VM/CBC instructions
 - Improve ecma_op_function_{construct, call} to properly set new.target

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2020-03-16 14:37:47 +01:00
committed by GitHub
parent 56b9f098ab
commit bfd2639634
49 changed files with 1671 additions and 1490 deletions
-4
View File
@@ -29,8 +29,6 @@
JERRY_STATIC_ASSERT (PARSER_WITH_CONTEXT_STACK_ALLOCATION == PARSER_BLOCK_CONTEXT_STACK_ALLOCATION,
parser_with_context_stack_allocation_must_be_equal_to_parser_block_context_stack_allocation);
JERRY_STATIC_ASSERT (PARSER_WITH_CONTEXT_STACK_ALLOCATION == PARSER_SUPER_CLASS_CONTEXT_STACK_ALLOCATION,
parser_with_context_stack_allocation_must_be_equal_to_parser_super_class_context_stack_allocation);
/**
* Abort (finalize) the current stack context, and remove it.
@@ -69,7 +67,6 @@ vm_stack_context_abort (vm_frame_ctx_t *frame_ctx_p, /**< frame context */
}
#if ENABLED (JERRY_ES2015)
case VM_CONTEXT_BLOCK:
case VM_CONTEXT_SUPER_CLASS:
#endif /* ENABLED (JERRY_ES2015) */
case VM_CONTEXT_WITH:
{
@@ -315,7 +312,6 @@ vm_get_context_value_offsets (ecma_value_t *context_item_p) /**< any item of a c
}
#if ENABLED (JERRY_ES2015)
case VM_CONTEXT_BLOCK:
case VM_CONTEXT_SUPER_CLASS:
#endif /* ENABLED (JERRY_ES2015) */
case VM_CONTEXT_WITH:
{