Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | /**
* What the whole program does to its function parameters.
*
* Facts that are cross-file by nature: whether a callee modifies a parameter
* decides whether its caller's argument may take ADR-013 auto-const, and the
* callee is routinely in another file.
*
* They used to be accumulated. Each file was analyzed with the running total
* injected first, its own contribution extracted back out, and the global maps
* saved and restored around the whole thing — so the answer to "does this
* callee modify its parameter?" depended on how many files had been processed
* when it was asked. Derived once over every tree instead (#1511), by
* `Program.build` itself since #1825, so `Program` is both where they are
* derived and the artifact later passes read them from.
*
* #1825: the call graph propagation runs over is not one of them. `Program`
* exposed it, and nothing read it -- it is an input to the derivation, which
* holds it for as long as the derivation runs.
*/
interface IModificationFacts {
/** Function name to the names of the parameters it modifies. */
readonly modifiedParameters: ReadonlyMap<string, ReadonlySet<string>>;
/** Function name to its parameter names, in declaration order. */
readonly functionParamLists: ReadonlyMap<string, ReadonlyArray<string>>;
}
export default IModificationFacts;
|