/** * What the analyzer records for the emitter: one side table per lowering * decision, keyed by node offset or by span identity. * * D114 R1a: these tables were 52 private fields on `Analyzer`, interleaved with * its inference state. They are one cohesive thing — the analyzer's half of the * `LoweringHints` contract — so they live in one collaborator the analyzer owns * as `this.lowering`. The recorder holds no analyzer reference: the only thing * it needs from its host arrives as the argument to `hints`. * * Three tables of the contract are not here. `enumValueBindings`, * `extensionLiterals` and `extensionCalls` are `protected` members of * `Analyzer` that the Web analyzer writes, so they stay on the class whose seam * they belong to and reach the assembly through `AnalyzerOwnedHints`. The other * four entries of `LoweringHints` are not tables at all — `classNames`, * `errorSubclassNames`, `enumNames` and `genericTypeNames` are derived at * assembly time from the analyzer's class, enum and generic rosters. */ import { type Expression } from "../ast.ts"; import { type CollectionOperation, type CollectionRuntimeKind, type DisposalContract, type FormReadField, type LoweringHints, type PrimitiveOperation, type RecordFromHint, type RecordTypeField, type RuntimeNarrowingGuard } from "../contracts.ts"; import { type BinaryStorageKind } from "../types.ts"; /** * The part of `LoweringHints` the recorder cannot answer: the three * `protected` tables that belong to the analyzer's subclass seam, and the four * entries derived from the analyzer's own class, enum and generic rosters. */ export interface AnalyzerOwnedHints { readonly runtimeTypeIdentities: ReadonlyMap; readonly classNames: ReadonlySet; readonly errorSubclassNames: ReadonlySet; readonly enumNames: ReadonlySet; readonly genericTypeNames: ReadonlySet; readonly enumValueBindings: ReadonlyMap; readonly extensionLiterals: ReadonlyMap; readonly extensionCalls: ReadonlyMap; } export declare class LoweringRecorder { readonly collectionCalls: Map; readonly collectionSizes: Map; readonly collectionIndexes: Map; readonly collectionMemberships: Map; readonly collectionIterations: Map; readonly recordFromCalls: Map; readonly recordMapFromCalls: Map; readonly binaryCalls: Map; readonly binarySizes: Map; readonly binaryIndexes: Map; readonly primitiveCalls: Map; readonly stringSizes: Set; readonly constructorCalls: Set; readonly javaScriptCallBoundaries: Set; readonly classChecks: Set; readonly privateMembers: Set; /** Module-scope names bound to runtime Type objects (local and imported); see LoweringHints.runtimeTypeObjectNames. */ readonly runtimeTypeObjectNames: Set; moduleNamespaceExports: NonNullable; runtimeTypeReExports: NonNullable; runtimeTypeExports: NonNullable; runtimeTypeImports: NonNullable; /** Analyzer-owned complete field tables passed to the emitter for runtime validation. */ readonly typeDeclarationFields: Map; readonly optionalMembers: Set; readonly optionalCalls: Set; readonly optionalIndexes: Set; readonly optionalCallees: Set; readonly truthConditions: Set; readonly normalizedNullResults: Set; readonly normalizedPromiseValues: Set; readonly asyncResolvedValues: Set; readonly asyncForStatements: Set; readonly nativeRangeForStatements: Set; readonly normalizedUndefinedExpressions: Set; readonly instanceFieldReads: Set; readonly errorCodeReads: Set; readonly privateInstanceFieldReads: Set; readonly staticFieldReads: Map; readonly classMethodReferences: Set; readonly optionalBindingEntries: Set; readonly reactiveReferences: Map; readonly exhaustiveMatches: Set; readonly formReads: Map; readonly namedArgumentOrders: Map; readonly moduleNamespaceReferences: Set; readonly builtinValueReferences: Map; readonly runtimeNarrowings: Map; readonly sameValueZeroEqualities: Set; readonly sameValueZeroMatchValues: Set; readonly equalsCalls: Set; readonly stringOrderings: Set; readonly dynamicOrderings: Set; readonly usingDisposals: Map; readonly classDisposeChains: Map; /** D68 rule 177: expression spans a consumer iterates through `@iterate:`. */ readonly iterationContracts: Set; /** D90 R18: `async for` statements pulling a declared asynchronous `@iterate:`. */ readonly asyncIterationStatements: Set; /** D90 R18: `@iterate:` blocks that are the asynchronous pull form, by keyword span. */ readonly asyncIterateBlocks: Set; readonly moduleTopLevelHostCalls: Set; /** True when this expression was accepted using a flow fact from its branch. */ expressionUsesRuntimeNarrowing(expression: Expression): boolean; expressionAlreadyNormalizesUndefined(expression: Expression): boolean; hints(owned: AnalyzerOwnedHints): LoweringHints; } //# sourceMappingURL=lowering-recorder.d.ts.map