Repository navigation
javascript: path says unknown, not independent, for a callee stored on this, in a module variable, in a tested options member, or computed by an expression (#1675) - #1696
Merged
Conversation
swapnilpaliwal-sd
requested review from
JaredHLZhang,
Whua689 and
suyashpaliwal26
as code owners
September 28, 2026 18:54
… function stored on this, in a module variable, in a tested options member, or through an expression (#1675) unresolved_value_callee gains five reasons, each an unresolved call whose callee is a value the graph does not hold: - module_variable: `let handler = null; ... handler()` - field: `this.cb()` where cb is a field, not a method - parameter_member: `opts.onReady()` when the code treats the member as an optional function (typeof test, `&&`/`||`/`??` guard, if condition, `?.()`) - expression: `(c ? a : b)()`, `(0, cb)()`, `make()()` - dynamic_code: `new Function(s)()` A bare member call on an untyped parameter (`res.send()`, `s.trim()`) is not counted: without a type it reads the same as a library method, and counting it turned 10 of 12 independent pairs on a real Express app into unknown. No call edge changes. Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
…iased this field, a fallback field and new this.Ctor() (#1675) The field reason of unresolved_value_callee now covers: - a field holding only null until a setter runs (`cb = null`, `this.cb = null`, `static cb = null`): the null literal no longer counts as the known value - a static `this.cb = f` / `this.cb()` pair, known by the assignment, not a field declaration - `self.cb()` with `const self = this`: any receiver valued as the instance or class - `new this.Ctor()` - `this.cb = cb || function () {}`: the call resolves to the fallback, but the parameter it falls back from is a function no caller in the graph supplies A module variable initialised from a call and never reassigned (`const log = require('debug')('app')`) is no longer a value callee: the library made it. One handed a function (`memo(Inner)`) stays open. `Model.tag2()` (a known-missing member of case 49) now names the field. No call edge changes. Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
swapnilpaliwal-sd
force-pushed
the
loop/ja-is1675
branch
from
September 28, 2026 20:36
37309c1 to
61bb4ad
Compare
This was referenced Sep 28, 2026
Merged
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
path A Banswered "the two are independent in this graph" when A's only open call went through a function value that is not a bare parameter, loop variable or local.unresolved_value_calleenow also marks:let handler = null; … handler())this.cb(),self.cb()(const self = this), a staticthis.cb(),new this.Ctor(), a field holding onlynulluntil a setter runs, andthis.cb = cb || function () {}&&/||/??guard, if condition,?.()(c ? a : b)(),(0, cb)()), andnew Function(s)()Controls that stay independent:
this.own(),this.emit()on a class extending a library class,path.join,res.status().send(), a bareopts.onReady(), and a module variable holding what a library call returned (const log = require('debug')('app')). One handed a project function (memo(Inner)) stays unknown.Checked: call edges unchanged on two real Express apps (2041 → 2041, 1411 → 1411; one library-made
module_variabledropped); JS goldens 73/73 (09 and 15 flaked once under load, pass alone); JS path cases 92/93 (next-step-reads-the-whole-answer fails the same way on the baseline).Closes #1675