/** * `inputs[]`, one entry per `input()` call, in source order. * * Each input owns a slot in the top-level frame and the engine writes the * effective value into that slot at the start of every bar * (`compiled-program.md` 2.6 and 5.1 step 5). There is no instruction for an * `input()` anywhere in the program, which is why this runs before a single * statement is emitted: the slots have to exist first, and the two instructions * that keep a register in step with one have to be the first thing the bar does. * * A `"source"` input's default names a series rather than holding one, written * `["s", ""]` in the same form as every other default. The `kind` field * is what says the string names a series, so the constant pool needs no tag of * its own for one. */ import type { Call } from '../ast/index.js'; import type { Emitter, Frame } from './context.js'; export declare function buildInputs(e: Emitter, f: Frame): void; /** * An `input()` written where a value belongs, which is a read of its slot. * * Reaching here means the call stands in an expression rather than being the * whole of a statement, and `outputs.ts` is where that split is decided and * argued. The declaration itself still emits nothing: the row and the slot are * made above, before a statement is emitted, and the engine writes the slot at * step 5 of every bar. All this adds is the one instruction that puts what the * engine wrote on the stack. * * **A slot belongs to one frame** (3.2), and an input's slot belongs to the top * level's. So a read from inside a function body has no instruction that reaches * it. `language.md` 13.4 puts an `input()` at the top level of a file in the * first place, and where the checker has not already refused one this says the * compiler cannot carry it rather than loading a slot of another frame that * happens to have the same number. * * **A read's expression is the case that is not that one.** It is compiled as a * program of its own over other bars, so it cannot reach the slot either, and * it does not need to: 2.16's `inputs` on the request exists exactly so a * setting can cross into a body, the engine resolves the key in the enclosing * program before the body runs and fills a register of the body's own table * with it, and `stdlib.md` 15.4 has always let the expression name a setting. * That the setting is written in place rather than behind a name changes * nothing about any of it, so the call resolves through the same scope the * name does and loads the same register. */ export declare function emitInputRead(e: Emitter, f: Frame, call: Call): void; //# sourceMappingURL=inputs.d.ts.map