Commit 2e13fe2
committed
Fix 9 broken tests: hasOwn on class instances, PIE symbol key, RegExp sync
Three independent fixes addressing the failing-test cluster:
1. HasOwnPropertyHelper: add $IHasFields branch for user-defined class
instances. Regression from 1866d2f which unified ObjectHasOwn into
HasOwnPropertyHelper but lost the $IHasFields → Fields.ContainsKey
path. Object.hasOwn(p, "name") on a class instance silently returned
false. New branch dispatches through the per-class HasProperty
(compile-time backing-field + _fields check) with a PDS fallback for
defineProperty-installed descriptors.
2. PropertyIsEnumerableHelper symbol-key path: remove the broken
PDSGetPropertyDescriptor call. PDS is string-keyed; the call was
passing the Symbol object as the string `name` parameter, which
ILVerify flagged as StackUnexpected and would have thrown at runtime
if a defineProperty-installed symbol descriptor ever surfaced. Symbol
keys go through the per-receiver symbol dict only — spec-default
enumerable=true per ECMA-262 §17 for plain `obj[sym] = v` assignments.
3. RuntimeTypeSyncTests SharpTSRegExp ignored list: add DefineAccessor
and TryGetAccessor. These are interpreter-only (added in ad935b8 for
ECMA-262 §22.2 configurable-accessor parity); compiled $RegExp routes
defineProperty accessors through the central PropertyDescriptorStore,
so emitting equivalents would be dead code.
Test results: 10,321/10,321 passing (was 10,312 with 9 failures).1 parent a9877cd commit 2e13fe2
2 files changed
Lines changed: 45 additions & 19 deletions
File tree
- Compilation
- SharpTS.Tests/Compilation
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
124 | 126 | | |
125 | 127 | | |
126 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
127 | 155 | | |
128 | 156 | | |
129 | 157 | | |
| |||
429 | 457 | | |
430 | 458 | | |
431 | 459 | | |
432 | | - | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
433 | 470 | | |
434 | 471 | | |
435 | 472 | | |
436 | 473 | | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | 474 | | |
455 | 475 | | |
456 | 476 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
101 | 107 | | |
102 | 108 | | |
103 | 109 | | |
| |||
0 commit comments