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:
@@ -118,6 +118,25 @@ opfunc_resume_executable_object (vm_executable_object_t *executable_object_p, ec
|
||||
|
||||
ecma_value_t
|
||||
opfunc_return_promise (ecma_value_t value);
|
||||
|
||||
ecma_value_t
|
||||
opfunc_create_implicit_class_constructor (uint8_t opcode);
|
||||
|
||||
void
|
||||
opfunc_push_class_environment (vm_frame_ctx_t *frame_ctx_p, ecma_value_t **vm_stack_top, ecma_value_t class_name);
|
||||
|
||||
ecma_value_t
|
||||
opfunc_init_class (vm_frame_ctx_t *frame_context_p, ecma_value_t *stack_top_p);
|
||||
|
||||
void
|
||||
opfunc_pop_lexical_environment (vm_frame_ctx_t *frame_ctx_p);
|
||||
|
||||
void
|
||||
opfunc_finalize_class (vm_frame_ctx_t *frame_ctx_p, ecma_value_t **vm_stack_top_p, ecma_value_t class_name);
|
||||
|
||||
ecma_value_t
|
||||
opfunc_form_super_reference (ecma_value_t **vm_stack_top_p, vm_frame_ctx_t *frame_ctx_p, ecma_value_t prop_name,
|
||||
uint8_t opcode);
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user