-
Notifications
You must be signed in to change notification settings - Fork 13
fix(native): persist this/super dispatch via hybrid WASM post-pass #1337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
0b4e8e2
fix(native): persist this/super dispatch via hybrid WASM post-pass (#…
carlos-alm f279398
fix: resolve merge conflicts with main (docs check acknowledged)
carlos-alm fd15d3c
fix(native): correct NULL ordering in findCallerByLine and remove sel…
carlos-alm 4a5c5b9
fix(native): scope this/super WASM re-parse to inheritance-hierarchy …
carlos-alm 773caf0
fix(native): document incremental limitation and capture thisDispatch…
carlos-alm 4d62390
Merge branch 'main' into fix/native-cha-this-super-dispatch-1326
carlos-alm 6426cb8
fix(native): re-classify node roles after this/super dispatch post-pa…
carlos-alm 90a2310
Merge remote-tracking branch 'origin/fix/native-cha-this-super-dispat…
carlos-alm 6efdc88
Merge branch 'main' into fix/native-cha-this-super-dispatch-1326
carlos-alm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
end_lineis absentThe comment says "NULL end_line sorts last in SQLite ASC", but SQLite actually sorts NULLs first in ASC order (NULLs are considered less than any other value). When any
method/functionnode hasend_line IS NULL, the expression(end_line - line)evaluates to NULL, which ranks before every positive span — so that unbounded node is picked byLIMIT 1instead of the tightest-bounded enclosing method. The intent (use unbounded nodes only as a last resort) is directly contradicted by the actual SQLite behaviour, meaningthis/superedges can silently be attributed to the wrong caller.Fix: replace the ORDER BY with
COALESCE(end_line - line, 999999999) ASCor(end_line - line) ASC NULLS LAST(supported since SQLite 3.30.0).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed — replaced
(end_line - line) ASCwithCOALESCE(end_line - line, 999999999) ASC. SQLite ASC orders NULLs first so the original query would pick unbounded nodes before any bounded node, inverting the intent. The COALESCE sentinel pushes them last, which is what the comment was trying to say. Committed in fd15d3c.