You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(native): resolve this-dispatch in func-prop methods when no extends edges exist
runPostNativeThisDispatch had two bugs that prevented it from resolving
`this.g()` inside `f.h = function() {}` (func-prop methods) on the native path:
1. Guard required at least one `extends` edge — func-prop this-dispatch
(`f.h = function(){ this.g() }`) works by treating the dot-prefix of the
caller name (`f` from `f.h`) as the class prefix; no class inheritance needed.
2. Full-build file selection only unioned files from `extends` edges — files
containing only func-prop method nodes were never re-parsed for this-dispatch.
3. Empty `parents` map caused early return — wrong when func-prop methods exist
without any class hierarchy (`resolveThisDispatch` handles empty parents by
doing direct class-prefix lookup on the first loop iteration).
Fix: expand the guard to also fire when dot-named `method` nodes exist in the DB;
skip the `parents` query entirely when no `extends` edges exist (avoiding the
unnecessary DB round-trip); remove the empty-parents bail-out; add func-prop
method nodes to the full-build file selection query.
Also adds `this-dispatch-func-prop` to TECHNIQUE_MAP in the resolution benchmark
so the mode is correctly bucketed as `cha-rta` if it appears in JS fixture edges.
docs check acknowledged
Closes#1512
0 commit comments