Script classes should be skipped during 'name' property lazy instantiation (#3809)

This patch fixes the TC262 language/expressions/class/name.js testcase.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2020-05-28 14:15:33 +02:00
committed by GitHub
parent 104001df68
commit d4fe48fae4
@@ -1474,6 +1474,8 @@ ecma_op_function_try_to_lazy_instantiate_property (ecma_object_t *object_p, /**<
ECMA_SET_SECOND_BIT_TO_POINTER_TAG (ext_func_p->u.function.scope_cp); ECMA_SET_SECOND_BIT_TO_POINTER_TAG (ext_func_p->u.function.scope_cp);
const ecma_compiled_code_t *bytecode_data_p = ecma_op_function_get_compiled_code (ext_func_p); const ecma_compiled_code_t *bytecode_data_p = ecma_op_function_get_compiled_code (ext_func_p);
if (!(bytecode_data_p->status_flags & CBC_CODE_FLAGS_CLASS_CONSTRUCTOR))
{
ecma_value_t value = *ecma_compiled_code_resolve_function_name (bytecode_data_p); ecma_value_t value = *ecma_compiled_code_resolve_function_name (bytecode_data_p);
if (value != ECMA_VALUE_EMPTY) if (value != ECMA_VALUE_EMPTY)
{ {
@@ -1489,6 +1491,7 @@ ecma_op_function_try_to_lazy_instantiate_property (ecma_object_t *object_p, /**<
return value_prop_p; return value_prop_p;
} }
} }
}
return NULL; return NULL;
} }