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
@@ -565,7 +565,25 @@ BUILTIN_ROUTINE (ECMA_BUILTIN_ID_WEAKSET,
#endif /* JERRY_BUILTIN_WEAKSET */
#if JERRY_BUILTIN_PROXY
#if JERRY_BUILTIN_WEAKREF
/* The WeakRef prototype object */
BUILTIN (ECMA_BUILTIN_ID_WEAKREF_PROTOTYPE,
ECMA_OBJECT_TYPE_GENERAL,
ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
true,
weakref_prototype)
/* The WeakRef routine */
BUILTIN_ROUTINE (ECMA_BUILTIN_ID_WEAKREF,
ECMA_OBJECT_TYPE_NATIVE_FUNCTION,
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
true,
weakref)
#endif /* JERRY_BUILTIN_WEAKREF */
#if (JERRY_BUILTIN_PROXY)
/* The Proxy routine (ECMA-262 v6, 26.2.1) */
BUILTIN_ROUTINE (ECMA_BUILTIN_ID_PROXY,
ECMA_OBJECT_TYPE_NATIVE_FUNCTION,