/** * Which call sites do not run on every bar. * * `language.md` 11.4 states its rule about a call site rather than about a * statement: a call site that does not execute on a bar leaves its series * absent for that bar and its state untouched. OS8001 is the warning for a * stateful call written in one, so what the warning needs is a fact about where * a call sits in the tree, and that is the whole of what this file works out. * * It is a file rather than a flag carried down the passes because the passes * are the wrong place to keep it. Two of the constructs that skip an operand * are operators rather than statements: the ternary evaluates only the taken * arm (9.5), and `and` and `or` evaluate the right operand only when it can * change the answer (9.4). A third is inside a statement the pass does walk, * where it walks only the bodies: a branch after the first is reached only when * every condition above it was false, so an `else if` condition and a later * `case` arm's values are skipped as readily as the bodies are (10.2 and 10.6). * What an analysis misses there is silent: a real number computed from a subset * of the bars and drawn as though it came from all of them. * * So the question is asked once, of the tree, through the one traversal in * `childrenOf`. `reachOf` says how a node reaches each of its children and has * no default arm, which means a node kind added to the language stops the build * here, at the one place that has to decide whether it can skip a child. */ import type { Call, Script } from '../ast/index.js'; /** * Every call site in the file that a bar can pass without evaluating. * * Calls rather than nodes, because a call site is what 11.4 is about and what * holds state. Kept as the nodes themselves rather than as spans, so the answer * cannot drift from the tree the checker is walking. */ export declare function conditionalCalls(script: Script): ReadonlySet; //# sourceMappingURL=conditional.d.ts.map