Implement WeakRef Object (#4546)

Related test262 test-cases has been removed from skip list.
Execpt two test-case since they need other feature to work (Finalization registry and async GC)

JerryScript-DCO-1.0-Signed-off-by: Bence Gabor Kis kisbg@inf.u-szeged.hu
This commit is contained in:
kisbg
2021-03-01 12:46:54 +00:00
committed by GitHub
parent 9556701742
commit 129ca4946c
24 changed files with 500 additions and 108 deletions
+9
View File
@@ -1237,6 +1237,12 @@ jerry_object_get_type (const jerry_value_t value) /**< input value to check */
return JERRY_OBJECT_TYPE_CONTAINER;
}
#endif /* JERRY_BUILTIN_CONTAINER */
#if JERRY_BUILTIN_WEAKREF
case LIT_MAGIC_STRING_WEAKREF_UL:
{
return JERRY_OBJECT_TYPE_WEAKREF;
}
#endif /* JERRY_BUILTIN_WEAKREF */
default:
{
break;
@@ -1460,6 +1466,9 @@ jerry_is_feature_enabled (const jerry_feature_t feature) /**< feature to check *
#if JERRY_BUILTIN_WEAKMAP
|| feature == JERRY_FEATURE_WEAKMAP
#endif /* JERRY_BUILTIN_WEAKMAP */
#if JERRY_BUILTIN_WEAKREF
|| feature == JERRY_FEATURE_WEAKREF
#endif /* JERRY_BUILTIN_WEAKREF */
#if JERRY_BUILTIN_WEAKSET
|| feature == JERRY_FEATURE_WEAKSET
#endif /* JERRY_BUILTIN_WEAKSET */