Repository navigation
Conversation
|
Updated validation after the supplied review: The review's two lost pool calls are confirmed and fixed ( The proposed global alias-name fallback does add 207 calls in this corpus, mostly real ambient parser methods. It also creates false targets for external aliases, same-named classes and shadowed bindings. Those broader alias forms need module-aware work; they are not solved by this constructor-only patch. The shared super fallback also breaks recursion beside The baseline also incorrectly resolves Fresh three-round timing is effectively comparable with current main in both the 4,000-super fixture and the 893-file corpus. The corrected corpus still uses about +111 MiB / +5.2% median peak RSS; that remaining cost is explicit in the description. The complete four-PR Windows integration passed 6,752 tests with zero failures and 406 existing-gate skips. |
|
Thanks for working on this. Following 1. class B { m() {} }
class A extends B {
make() {
const proto = {};
const o = { __proto__: proto, m() { return super.m(); } };
return o;
}
}
The enclosing class seems to be picked by line span, so an object literal inside a method inherits it. Skipping object-literal methods when looking for the class would avoid this. 2. class B {
static s() {}
s() {}
}
class A extends B {
static s() {
const f = () => super.s();
return f;
}
}
Static-ness seems to be read from the arrow, not from the nearest enclosing non-arrow method. Separately, the branch is 171 commits behind and conflicts in |
|
Thanks @Puma7 for #2497 and this PR. |
Method calls through imported JS constructor aliases can lose their class target, and an override's explicit
supercall can remain unresolved. Resolve the actual import/class identity and runtimeextendsparent, preserving recursion and static/instance distinctions.Closes #2497.
Ordinary uniquely resolved unaliased receivers retain the existing inference, including returned/destructured values. Imported aliases remain conservative around shadowing/reassignment. Source preprocessing is deferred until needed, raw lines are reused, and resolved superclass lookups share the generation-tagged cache.
Validation: all 112 constructor/super tests pass with an active native kernel. Comparing 893 public TS files against main
80e4b459preserves all 35,465 call-site tuples (source, target, line, column), with no additions or losses. This corrects the two pool-site losses found after the earlier comparison, which had not distinguished call positions.Typed/CJS alias expansion, arbitrary dataflow and other-OS validation are outside this patch. Re-index after upgrading.
Combined validation against main
80e4b459(Windows, Node 24, WASM, two workers): 6,752 passed, zero failed, 406 skipped under existing platform/kernel gates; standard timeouts unchanged. Separate active-native checks passed 152 class/parity and 112 constructor/super cases. These are local results, not GitHub CI or other-OS claims.Performance (three serial interleaved rounds, fresh fixtures, no concurrent tests): the 4,000-super-call fixture has median index/resolve time 1,233 ms on main and 1,202 ms here, resolving 3,801 versus all 4,000 parent calls. On the same 893 public TS files, medians are 15,623 / 15,542 ms; durations are effectively comparable in this small sample. Median peak RSS remains 2,154 / 2,265 MiB (about +111 MiB / +5.2%). Unnecessary preprocessing is removed, but remaining memory overhead is not claimed eliminated. These are fixture-specific Windows/WASM results, not universal performance factors.