Rework frame context (#4200)

A new shared frame context data is created which allows sharing
data between the function call and vm main loop. Furthermore
rest arguments and current function object handling is reworked.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2020-09-21 10:25:17 +02:00
committed by GitHub
parent 55554535b2
commit 4d135bec5d
17 changed files with 311 additions and 181 deletions
+2 -2
View File
@@ -450,7 +450,7 @@ ecma_gc_mark_executable_object (ecma_object_t *object_p) /**< object */
ecma_gc_set_object_visited (ecma_get_object_from_value (executable_object_p->frame_ctx.this_binding));
}
const ecma_compiled_code_t *bytecode_header_p = executable_object_p->frame_ctx.bytecode_header_p;
const ecma_compiled_code_t *bytecode_header_p = executable_object_p->shared.bytecode_header_p;
size_t register_end;
if (bytecode_header_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)
@@ -953,7 +953,7 @@ ecma_gc_free_executable_object (ecma_object_t *object_p) /**< object */
{
vm_executable_object_t *executable_object_p = (vm_executable_object_t *) object_p;
const ecma_compiled_code_t *bytecode_header_p = executable_object_p->frame_ctx.bytecode_header_p;
const ecma_compiled_code_t *bytecode_header_p = executable_object_p->shared.bytecode_header_p;
size_t size, register_end;
if (bytecode_header_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)
@@ -62,7 +62,6 @@ ecma_init (void)
#if ENABLED (JERRY_ESNEXT)
JERRY_CONTEXT (current_new_target) = NULL;
JERRY_CONTEXT (current_function_obj_p) = NULL;
#endif /* ENABLED (JERRY_ESNEXT) */
} /* ecma_init */
@@ -74,7 +73,6 @@ ecma_finalize (void)
{
#if ENABLED (JERRY_ESNEXT)
JERRY_ASSERT (JERRY_CONTEXT (current_new_target) == NULL);
JERRY_ASSERT (JERRY_CONTEXT (current_function_obj_p) == NULL);
#endif /* ENABLED (JERRY_ESNEXT) */
ecma_finalize_global_environment ();