Fix the types of builtin prototype objects (#3663)

In ES2015 many builtin prototypes are no longer valid instances of their
respective classes. This change updates affected prototypes to be
regular objects as required.

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
This commit is contained in:
Dániel Bátyai
2020-04-06 12:00:58 +02:00
committed by GitHub
parent 73a78bd223
commit 48fa2ec01b
41 changed files with 372 additions and 272 deletions
+1 -12
View File
@@ -1106,23 +1106,12 @@ ecma_gc_free_object (ecma_object_t *object_p) /**< object to free */
ecma_dealloc_number (num_p);
break;
}
#if ENABLED (JERRY_ES2015)
case LIT_INTERNAL_MAGIC_STRING_REGEXP_PROTO:
{
jmem_heap_free_block (ECMA_GET_INTERNAL_VALUE_POINTER (void, ext_object_p->u.class_prop.u.value),
ECMA_REGEXP_PROTO_COMPILED_CODE_SIZE);
break;
}
#endif /* ENABLED (JERRY_ES2015) */
case LIT_MAGIC_STRING_REGEXP_UL:
{
ecma_compiled_code_t *bytecode_p = ECMA_GET_INTERNAL_VALUE_ANY_POINTER (ecma_compiled_code_t,
ext_object_p->u.class_prop.u.value);
if (bytecode_p != NULL)
{
ecma_bytecode_deref (bytecode_p);
}
ecma_bytecode_deref (bytecode_p);
break;
}