Commit eeed4fe
committed
Fix WeakMap/WeakSet to pass 115 Test262 tests (176/176)
- Rewrite WeakMap/WeakSet constructors to use spec-compliant iterator protocol with .set()/.add() calls
- Validate set/add callable before iterating; throw TypeError if not a function
- Add new_target parameter for Reflect.construct support
- Set constructor length/name properties (non-enumerable, non-writable, configurable)
- Set Function.prototype as constructor [[Prototype]]
- Mark prototype property non-enumerable, non-writable, non-configurable
- Add Symbol.toStringTag on WeakMap.prototype and WeakSet.prototype
- Change raise_eval_error to raise_type_error in dispatch and instance methods
- Return this (wrapper object) from set/add instead of raw Value::WeakMap/WeakSet
- Relax strict argument count checks to match spec behavior
- Register WeakMap/WeakSet method lengths in all three function-length tables
- Add CI workflow entries for built-ins/Uint8Array through built-ins/WeakSet and built-ins/Temporal1 parent de7cf83 commit eeed4fe
6 files changed
Lines changed: 300 additions & 165 deletions
File tree
- .github/workflows
- src
- core
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
| |||
234 | 236 | | |
235 | 237 | | |
236 | 238 | | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
237 | 247 | | |
238 | 248 | | |
239 | 249 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12741 | 12741 | | |
12742 | 12742 | | |
12743 | 12743 | | |
12744 | | - | |
| 12744 | + | |
12745 | 12745 | | |
12746 | 12746 | | |
12747 | | - | |
| 12747 | + | |
| 12748 | + | |
| 12749 | + | |
| 12750 | + | |
12748 | 12751 | | |
12749 | 12752 | | |
12750 | | - | |
| 12753 | + | |
12751 | 12754 | | |
12752 | 12755 | | |
12753 | 12756 | | |
12754 | | - | |
| 12757 | + | |
12755 | 12758 | | |
12756 | 12759 | | |
12757 | | - | |
| 12760 | + | |
12758 | 12761 | | |
12759 | 12762 | | |
12760 | | - | |
| 12763 | + | |
12761 | 12764 | | |
12762 | 12765 | | |
12763 | 12766 | | |
12764 | 12767 | | |
12765 | 12768 | | |
12766 | 12769 | | |
12767 | 12770 | | |
12768 | | - | |
| 12771 | + | |
| 12772 | + | |
| 12773 | + | |
12769 | 12774 | | |
12770 | | - | |
| 12775 | + | |
| 12776 | + | |
| 12777 | + | |
| 12778 | + | |
12771 | 12779 | | |
12772 | 12780 | | |
12773 | | - | |
| 12781 | + | |
12774 | 12782 | | |
12775 | 12783 | | |
12776 | | - | |
| 12784 | + | |
| 12785 | + | |
| 12786 | + | |
12777 | 12787 | | |
12778 | | - | |
| 12788 | + | |
12779 | 12789 | | |
12780 | 12790 | | |
12781 | | - | |
| 12791 | + | |
12782 | 12792 | | |
12783 | 12793 | | |
12784 | 12794 | | |
| |||
16450 | 16460 | | |
16451 | 16461 | | |
16452 | 16462 | | |
| 16463 | + | |
| 16464 | + | |
| 16465 | + | |
| 16466 | + | |
| 16467 | + | |
| 16468 | + | |
16453 | 16469 | | |
16454 | 16470 | | |
16455 | 16471 | | |
| |||
16541 | 16557 | | |
16542 | 16558 | | |
16543 | 16559 | | |
| 16560 | + | |
16544 | 16561 | | |
16545 | 16562 | | |
16546 | 16563 | | |
| |||
17895 | 17912 | | |
17896 | 17913 | | |
17897 | 17914 | | |
| 17915 | + | |
| 17916 | + | |
| 17917 | + | |
| 17918 | + | |
| 17919 | + | |
| 17920 | + | |
17898 | 17921 | | |
17899 | 17922 | | |
17900 | 17923 | | |
| |||
17987 | 18010 | | |
17988 | 18011 | | |
17989 | 18012 | | |
| 18013 | + | |
17990 | 18014 | | |
17991 | 18015 | | |
17992 | 18016 | | |
| |||
22132 | 22156 | | |
22133 | 22157 | | |
22134 | 22158 | | |
22135 | | - | |
| 22159 | + | |
22136 | 22160 | | |
22137 | | - | |
| 22161 | + | |
22138 | 22162 | | |
22139 | 22163 | | |
22140 | 22164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1597 | 1597 | | |
1598 | 1598 | | |
1599 | 1599 | | |
1600 | | - | |
1601 | | - | |
| 1600 | + | |
| 1601 | + | |
1602 | 1602 | | |
1603 | 1603 | | |
1604 | 1604 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1757 | 1757 | | |
1758 | 1758 | | |
1759 | 1759 | | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
1760 | 1766 | | |
1761 | 1767 | | |
1762 | 1768 | | |
| |||
1838 | 1844 | | |
1839 | 1845 | | |
1840 | 1846 | | |
| 1847 | + | |
1841 | 1848 | | |
1842 | 1849 | | |
1843 | 1850 | | |
| |||
0 commit comments