reworked weak references so that cycles are (hopefully) correctly handled - added Symbol as WeakMap key, WeakRef and FinalizationRegistry

This commit is contained in:
Fabrice Bellard
2025-04-05 12:49:29 +02:00
parent bf164d640f
commit 8b5b1277ad
7 changed files with 550 additions and 121 deletions

View File

@@ -210,6 +210,8 @@ DEF(Float32Array, "Float32Array")
DEF(Float64Array, "Float64Array")
DEF(DataView, "DataView")
DEF(BigInt, "BigInt")
DEF(WeakRef, "WeakRef")
DEF(FinalizationRegistry, "FinalizationRegistry")
DEF(Map, "Map")
DEF(Set, "Set") /* Map + 1 */
DEF(WeakMap, "WeakMap") /* Map + 2 */