@llui/compiler 0.5.1 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/collect-deps.d.ts +5 -1
- package/dist/collect-deps.d.ts.map +1 -1
- package/dist/collect-deps.js +93 -14
- package/dist/collect-deps.js.map +1 -1
- package/dist/cross-file-walker.d.ts +4 -1
- package/dist/cross-file-walker.d.ts.map +1 -1
- package/dist/cross-file-walker.js +72 -9
- package/dist/cross-file-walker.js.map +1 -1
- package/dist/lint-modules.d.ts.map +1 -1
- package/dist/lint-modules.js +2 -0
- package/dist/lint-modules.js.map +1 -1
- package/dist/modules/bitmask-overflow.js +1 -1
- package/dist/modules/bitmask-overflow.js.map +1 -1
- package/dist/modules/core-synthesis.d.ts +7 -0
- package/dist/modules/core-synthesis.d.ts.map +1 -1
- package/dist/modules/core-synthesis.js +24 -12
- package/dist/modules/core-synthesis.js.map +1 -1
- package/dist/modules/opaque-state-flow.d.ts +3 -0
- package/dist/modules/opaque-state-flow.d.ts.map +1 -0
- package/dist/modules/opaque-state-flow.js +208 -0
- package/dist/modules/opaque-state-flow.js.map +1 -0
- package/dist/transform.d.ts +1 -1
- package/dist/transform.d.ts.map +1 -1
- package/dist/transform.js +75 -5
- package/dist/transform.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-synthesis.js","sourceRoot":"","sources":["../../src/modules/core-synthesis.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,wEAAwE;AACxE,iEAAiE;AACjE,yEAAyE;AACzE,EAAE;AACF,uEAAuE;AACvE,2DAA2D;AAC3D,iEAAiE;AACjE,wEAAwE;AACxE,qEAAqE;AACrE,sEAAsE;AACtE,sEAAsE;AACtE,EAAE;AACF,sEAAsE;AACtE,wDAAwD;AACxD,8DAA8D;AAC9D,iEAAiE;AACjE,kEAAkE;AAClE,sEAAsE;AACtE,iCAAiC;AACjC,EAAE;AACF,mE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,CAAC,CAAC,wBAAwB,CAAC,YAAY,EAAE,CAAC,CAAC,4BAA4B,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAA;AAChG,CAAC;AAED,SAAS,WAAW,CAAC,CAAiB,EAAE,IAAY,EAAE,KAAe;IACnE,IAAI,IAAI,GAAkB,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAA;IAClD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,yCAAyC;QACzC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACrB,IAAI,GAAG,CAAC,CAAC,yBAAyB,CAAC,IAAI,EAAE,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE,IAAI,CAAC,CAAA;QAC/F,CAAC;aAAM,CAAC;YACN,IAAI,GAAG,CAAC,CAAC,8BAA8B,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;QACrD,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC","sourcesContent":["// `core-synthesis` — owns the co-emitted core trio:\n// - `__update` — Phase 1/2 dispatcher; reads `structuralMask`\n// - `__handlers` — per-message-type specialized handlers\n// - `__prefixes` — array of path-keyed reference-stable closures\n//\n// The three are NOT decomposable into separate modules (per v2c §7.9.2\n// design decision (a) vs (b)): they share `topLevelBits` /\n// `structuralMask` / `fieldBits` intermediates, and `__prefixes`\n// ordering is bit-position-keyed (the array index *is* the bit position\n// used by every binding's mask). Producing them in three independent\n// emit passes would either duplicate the analysis or require a shared\n// scratchpad slot — both lose vs the function's existing single pass.\n//\n// So this module owns the entire synthesis: `tryInjectDirty` plus its\n// ~600 lines of supporting helpers (`tryBuildHandlers`,\n// `buildCaseHandler`, `buildUpdateBody`, `buildPrefixesProp`,\n// `computeStructuralMask`, `buildAccess`, plus the case-analysis\n// helpers `detectArrayOp`, `findReturnArray`, `detectStrideLoop`,\n// `hasSliceAssignment`, `analyzeModifiedFields`). Moved verbatim from\n// transform.ts in v2c/decomp-21.\n//\n// Side-effect: the inline call sets `usesApplyBinding = true` when\n// the rewrite fires (drives `__runPhase2` + `__handleMsg` imports in\n// `cleanupImports`). The module surfaces this via `CORE_SYNTHESIS_SLOT`\n// for the umbrella to read after `registry.run`.\n\nimport ts from 'typescript'\nimport type { CompilerModule } from '../module.js'\nimport { computeAccessorMask, createMaskLiteral, isComponentCall } from '../transform.js'\n\nexport interface CoreSynthesisModuleOptions {\n fieldBits: Map<string, number>\n fieldBitsHi: Map<string, number>\n /** Component() call detection requires the @llui/dom import binding\n * to disambiguate from user-local `component` identifiers. */\n lluiImport: ts.ImportDeclaration\n}\n\nexport interface CoreSynthesisSlot {\n /** True when at least one component() call got the __update/__handlers/__prefixes\n * trio injected — drives `cleanupImports`'s decision about `__runPhase2`\n * + `__handleMsg` runtime imports. */\n usesApplyBinding: boolean\n}\n\nexport const CORE_SYNTHESIS_SLOT = 'core-synthesis:state'\n\nexport function coreSynthesisModule(opts: CoreSynthesisModuleOptions): CompilerModule {\n const { fieldBits, fieldBitsHi, lluiImport } = opts\n return {\n name: 'core-synthesis',\n compilerVersion: '^0.3.0',\n diagnostics: [],\n visitors: {},\n\n transformCallEnter(ctx, node) {\n if (!isComponentCall(node, lluiImport)) return null\n const rewritten = tryInjectDirty(node, fieldBits, ctx.factory, fieldBitsHi)\n if (!rewritten) return null\n const slot = ctx.analysis.perModule.get(CORE_SYNTHESIS_SLOT) as CoreSynthesisSlot | undefined\n if (slot) slot.usesApplyBinding = true\n else\n ctx.analysis.perModule.set(CORE_SYNTHESIS_SLOT, {\n usesApplyBinding: true,\n } as CoreSynthesisSlot)\n return rewritten\n },\n }\n}\n\n// ─── Synthesis implementation (moved verbatim from transform.ts) ────\n\nfunction tryInjectDirty(\n node: ts.CallExpression,\n fieldBits: Map<string, number>,\n f: ts.NodeFactory,\n fieldBitsHi: Map<string, number> = new Map(),\n): ts.CallExpression | null {\n if (fieldBits.size === 0 && fieldBitsHi.size === 0) return null\n const configArg = node.arguments[0]\n if (!configArg || !ts.isObjectLiteralExpression(configArg)) return null\n\n // Check if __dirty already exists\n for (const prop of configArg.properties) {\n if (\n ts.isPropertyAssignment(prop) &&\n ts.isIdentifier(prop.name) &&\n prop.name.text === '__dirty'\n ) {\n return null\n }\n }\n\n // Top-level field → aggregated bit mask. Sub-paths under one field\n // (`route.page`, `route.data`) collapse into a single entry so\n // `tryBuildHandlers` can reason per-field. Positions 0..30 live here;\n // 31..61 in the parallel high-word map below. `__maskLegend` itself\n // is now owned by `maskLegendModule` (v2c/decomp-9).\n const topLevelBits = new Map<string, number>()\n for (const [path, bit] of fieldBits) {\n const topField = path.split('.')[0]!\n topLevelBits.set(topField, (topLevelBits.get(topField) ?? 0) | bit)\n }\n const topLevelBitsHi = new Map<string, number>()\n for (const [path, bit] of fieldBitsHi) {\n const topField = path.split('.')[0]!\n topLevelBitsHi.set(topField, (topLevelBitsHi.get(topField) ?? 0) | bit)\n }\n\n // Structural mask — used by __handlers.\n const structuralMask = computeStructuralMask(configArg, fieldBits)\n\n // v0.4 size-cut (Tier 2.4): the `__update` fast-path emission was\n // removed. Empirically (see benchmarks/bundle-baseline.json + the\n // strategy comparison in earlier work) it provided only ~3% wall-time\n // improvement on a 200-binding sparse-update workload, but cost 200-400\n // bytes per compiled component plus the dispatch branch in\n // processMessages. The runtime always uses genericUpdate now.\n\n // __handlers: per-message-type specialized update functions.\n // Analyzes the update() switch/case and generates direct handlers\n // that bypass the generic Phase 1/2 pipeline for single-message updates.\n // Tier 5 (drop __handlers) was attempted and REVERTED — see\n // benchmarks/bundle-baseline.json#/abandoned. The 1.4 kB savings cost\n // 23-89% perf on jfb's swap/remove/update/select.\n const handlersProp = tryBuildHandlers(configArg, topLevelBits, topLevelBitsHi, structuralMask, f)\n\n // `__maskLegend` is emitted by `maskLegendModule` via the registry\n // bridge (v2c/decomp-9); the umbrella's `applyRegistryEmissions` step\n // splices it into the same config-arg literal we return here.\n const extraProps: ts.ObjectLiteralElementLike[] = []\n if (handlersProp) extraProps.push(handlersProp)\n\n // __prefixes: opt-in path-keyed reactivity (see\n // docs/proposals/unified-composition-model.md). One closure per\n // distinct path that an accessor reads, hoisted into a stable array;\n // the array position IS the bit position used by the path's bindings.\n // The runtime prefers __prefixes when present and computes the\n // combinedDirty mask by reference-comparing `prefix(prev)` vs\n // `prefix(next)` for each entry — strictly more precise than the\n // top-level-conflated __dirty (which always co-fires bindings sharing\n // a top-level field even when only one sub-path actually mutated).\n //\n // Emit `__prefixes` whenever any reactive paths are present. For\n // components with ≤31 paths, the runtime's\n // `computeDirtyFromPrefixes` returns a single `number`; for\n // 32..61-path components it returns a `[lo, hi]` tuple that the\n // runtime fans out into `combinedDirty` + `combinedDirtyHi`. The\n // binding-level mask gating is still single-word at the compiler\n // emit layer today, so high-position bindings still re-evaluate\n // every cycle — but the dirty computation itself is now precise,\n // which lets memo()'d aggregates short-circuit correctly.\n const prefixesProp = buildPrefixesProp(fieldBits, fieldBitsHi, f)\n if (prefixesProp) extraProps.push(prefixesProp)\n\n const newConfig = f.createObjectLiteralExpression([...configArg.properties, ...extraProps], true)\n\n // `updateCallExpression` (not `createCallExpression`) so the new\n // node inherits `node.pos` / `node.end` from the original. Phase 2b\n // downstream consumers (componentMetaModule, etc.) read pos via\n // `getStart(sf)` for line info; a synthetic node (pos=-1) would\n // collapse every `component()` call's `__componentMeta.line` to 0.\n return f.updateCallExpression(node, node.expression, node.typeArguments, [\n newConfig,\n ...node.arguments.slice(1),\n ])\n}\n\n/**\n * Analyze update() switch/case and generate per-message-type handlers.\n *\n * Each handler receives (inst, msg) and returns [newState, effects].\n * The handler calls update() to get the new state, then directly invokes\n * the appropriate runtime primitives (reconcileItems, __directUpdate, etc.)\n * instead of going through the generic Phase 1/2 pipeline.\n *\n * Conservative: only generates handlers for cases where the field\n * modifications are statically determinable. Complex cases are skipped.\n */\nfunction tryBuildHandlers(\n configArg: ts.ObjectLiteralExpression,\n topLevelBits: Map<string, number>,\n topLevelBitsHi: Map<string, number>,\n structuralMask: number,\n f: ts.NodeFactory,\n): ts.PropertyAssignment | null {\n if (topLevelBits.size === 0 && topLevelBitsHi.size === 0) return null\n\n // Find the update function in the component config\n let updateFn: ts.ArrowFunction | ts.FunctionExpression | null = null\n for (const prop of configArg.properties) {\n if (\n ts.isPropertyAssignment(prop) &&\n ts.isIdentifier(prop.name) &&\n prop.name.text === 'update'\n ) {\n if (ts.isArrowFunction(prop.initializer) || ts.isFunctionExpression(prop.initializer)) {\n updateFn = prop.initializer\n }\n break\n }\n }\n if (!updateFn) return null\n\n // Find the switch statement in the update body\n const body = ts.isBlock(updateFn.body) ? updateFn.body : null\n if (!body) return null\n\n let switchStmt: ts.SwitchStatement | null = null\n for (const stmt of body.statements) {\n if (ts.isSwitchStatement(stmt)) {\n switchStmt = stmt\n break\n }\n }\n if (!switchStmt) return null\n\n // Check the switch discriminant is msg.type pattern\n const stateParam = updateFn.parameters[0]?.name\n const msgParam = updateFn.parameters[1]?.name\n if (!stateParam || !msgParam || !ts.isIdentifier(stateParam) || !ts.isIdentifier(msgParam))\n return null\n const stateName = stateParam.text\n\n // Analyze each case clause\n const handlers: ts.PropertyAssignment[] = []\n\n for (const clause of switchStmt.caseBlock.clauses) {\n if (!ts.isCaseClause(clause)) continue\n\n // Extract the case label — must be a string literal like 'select'\n if (!ts.isStringLiteral(clause.expression)) continue\n const msgType = clause.expression.text\n\n // Collect ALL return [newState, effects] statements recursively from the\n // case body. Multiple returns (from if/else branches) must all be analyzed\n // so the handler's dirty mask covers every possible modified field.\n const returnExprs: ts.ArrayLiteralExpression[] = []\n const collectReturns = (node: ts.Node): void => {\n if (\n ts.isReturnStatement(node) &&\n node.expression &&\n ts.isArrayLiteralExpression(node.expression) &&\n node.expression.elements.length >= 2\n ) {\n returnExprs.push(node.expression)\n return\n }\n // Don't descend into nested functions — their returns are unrelated.\n if (\n ts.isFunctionDeclaration(node) ||\n ts.isFunctionExpression(node) ||\n ts.isArrowFunction(node) ||\n ts.isMethodDeclaration(node)\n ) {\n return\n }\n ts.forEachChild(node, collectReturns)\n }\n for (const stmt of clause.statements) {\n collectReturns(stmt)\n }\n if (returnExprs.length === 0) continue\n\n // Union modified fields across all return paths.\n const allModified = new Set<string>()\n let bailOut = false\n for (const returnExpr of returnExprs) {\n const stateExpr = returnExpr.elements[0]!\n const fields = analyzeModifiedFields(stateExpr, stateName, topLevelBits, topLevelBitsHi)\n if (!fields) {\n bailOut = true\n break\n }\n for (const f of fields) allModified.add(f)\n }\n if (bailOut) continue // at least one return path was too complex\n\n const modifiedFields = Array.from(allModified)\n\n // Compute the dirty mask for this case across both words. Fields\n // tracked in `topLevelBitsHi` contribute to `caseDirtyHi`; fields\n // tracked nowhere (`undefined` lookup in both) fall back to\n // FULL_MASK in the low word — same conservative behavior as\n // before, just preserved per-word now.\n let caseDirty = 0\n let caseDirtyHi = 0\n for (const field of modifiedFields) {\n const lo = topLevelBits.get(field)\n const hi = topLevelBitsHi.get(field)\n if (lo === undefined && hi === undefined) {\n caseDirty |= 0xffffffff | 0\n } else {\n if (lo !== undefined) caseDirty |= lo\n if (hi !== undefined) caseDirtyHi |= hi\n }\n }\n\n // Detect array operation pattern for structural block optimization\n const arrayOp = detectArrayOp(clause, modifiedFields, structuralMask, caseDirty)\n\n const handler = buildCaseHandler(f, caseDirty, caseDirtyHi, arrayOp)\n handlers.push(f.createPropertyAssignment(f.createStringLiteral(msgType), handler))\n }\n\n if (handlers.length === 0) return null\n\n return f.createPropertyAssignment('__handlers', f.createObjectLiteralExpression(handlers, true))\n}\n\ntype ArrayOp =\n | 'none'\n | 'clear'\n | 'mutate'\n | 'remove'\n | 'general'\n | { type: 'strided'; stride: number } // for (i = 0; i < len; i += stride) pattern\n\n/**\n * Detect the array operation pattern in a case body.\n * - 'none': no array field modified (e.g., only `selected` changes)\n * - 'clear': array set to empty literal `[]`\n * - 'mutate': array created via `.slice()` then mutated in place (same keys)\n * - 'general': unknown pattern, use generic reconcile\n */\nfunction detectArrayOp(\n clause: ts.CaseClause,\n modifiedFields: string[],\n _structuralMask?: number,\n _caseDirty?: number,\n): ArrayOp {\n // No fields modified → no Phase 1 needed (no bindings can care if no\n // state field changed). Safe to return 'none' here because it's a\n // tautology: every binding mask ANDed with zero is zero.\n if (modifiedFields.length === 0) return 'none'\n\n // The specialized methods (`reconcileClear`, `reconcileItems`,\n // `reconcileRemove`, `reconcileChanged`) only exist on `each` blocks.\n // Non-each blocks (`show`, `branch`, `scope`) leave them undefined,\n // so a method other than 0 (general reconcile) silently no-ops on\n // those blocks at runtime. If the case modifies fields BEYOND the\n // array op (e.g. `{ ...state, open: true, name: '', tags: [] }`),\n // any show/branch block whose mask intersects the case's dirty bits\n // would be selected for reconcile but then skipped by the no-op\n // method invocation — its `when`/`on` accessor never re-evaluates,\n // and the component appears structurally inert after mount.\n //\n // Conservative correctness: only emit a non-general method when the\n // array op is the SOLE field modification. With one modified field,\n // the only blocks selected by mask gating are ones that read that\n // single field — and the optimization is well-defined for that\n // narrow case (each blocks operating on the array). Multi-field\n // cases fall through to `'general'` (method=0), so every selected\n // block runs the standard `reconcile` path. We trade a niche\n // optimization (small benefit even when applicable) for guaranteed\n // structural reconciliation across the framework's primitive set.\n //\n // Sister of show-helper-reconcile.test.ts, which fixed the same\n // class of bug on the method=-1 path. Same architectural principle:\n // the compiler can't see every block in the view, so optimizations\n // that route around `reconcile` must be ironclad. When in doubt,\n // emit method=0 and let `_handleMsg`'s per-block mask gate filter.\n //\n // Previously: if `(structuralMask & caseDirty) === 0`, return 'none'\n // on the theory that no structural block's mask could intersect this\n // case's dirty bits. That optimization was UNSAFE: `computeStructuralMask`\n // only walks the view function's lexical AST and does not descend into\n // helper function calls. A view like\n //\n // view: () => [\n // ...show({ when: s => s.mode === 'signin', render: () => [signinFormBody()] }),\n // ]\n //\n // where `signinFormBody()` is a helper that internally does\n // ...show({ when: s => s.errors.email !== undefined, ... })\n //\n // produces a `structuralMask` that covers `mode` but MISSES\n // `errors.email`. At runtime the inner show block is still registered\n // in `inst.structuralBlocks`, and it legitimately needs to reconcile\n // when `errors` changes — but the compiler was emitting `method = -1`\n // (skip blocks entirely) for cases that only touch `errors`, and the\n // error paragraphs would never mount.\n if (modifiedFields.length !== 1) return 'general'\n const onlyField = modifiedFields[0]!\n\n // Look at the return expression's array field values\n for (const stmt of clause.statements) {\n const returnExpr = findReturnArray(stmt)\n if (!returnExpr) continue\n\n const stateExpr = returnExpr.elements[0]\n if (!stateExpr || !ts.isObjectLiteralExpression(stateExpr)) continue\n\n for (const prop of stateExpr.properties) {\n const name =\n ts.isPropertyAssignment(prop) && ts.isIdentifier(prop.name)\n ? prop.name.text\n : ts.isShorthandPropertyAssignment(prop)\n ? prop.name.text\n : null\n if (!name) continue\n // The optimization only applies when the array op is on the\n // single tracked field. A `field: []` on a different field\n // (one not in modifiedFields, e.g. an untracked field) would\n // still no-op safely on each blocks via the mask gate, but to\n // keep the analysis tight we require an exact match.\n if (name !== onlyField) continue\n\n // Check for empty array literal: `field: []`\n if (\n ts.isPropertyAssignment(prop) &&\n ts.isArrayLiteralExpression(prop.initializer) &&\n prop.initializer.elements.length === 0\n ) {\n return 'clear'\n }\n\n // Check for shorthand `field` where field was assigned via `.slice()` earlier\n // This catches: `const rows = state.rows.slice(); rows[i] = ...; return { ...state, rows }`\n if (ts.isShorthandPropertyAssignment(prop)) {\n const varName = prop.name.text\n if (hasSliceAssignment(clause, varName)) {\n // Check for strided for-loop: for (let i = 0; i < arr.length; i += STRIDE)\n const stride = detectStrideLoop(clause, varName)\n if (stride > 1) return { type: 'strided', stride }\n return 'mutate'\n }\n }\n\n // Check for property assignment with filter: `field: state.field.filter(...)`\n if (ts.isPropertyAssignment(prop) && ts.isCallExpression(prop.initializer)) {\n const call = prop.initializer\n if (\n ts.isPropertyAccessExpression(call.expression) &&\n call.expression.name.text === 'filter'\n ) {\n return 'remove'\n }\n }\n }\n }\n\n return 'general'\n}\n\nfunction findReturnArray(stmt: ts.Statement): ts.ArrayLiteralExpression | null {\n if (ts.isReturnStatement(stmt) && stmt.expression && ts.isArrayLiteralExpression(stmt.expression))\n return stmt.expression\n if (ts.isBlock(stmt)) {\n for (const inner of stmt.statements) {\n const result = findReturnArray(inner)\n if (result) return result\n }\n }\n return null\n}\n\n/**\n * Detect a strided for-loop: `for (let i = 0; i < arr.length; i += STRIDE)`\n * where `arr` is the named variable. Returns the stride or 0 if not found.\n */\nfunction detectStrideLoop(clause: ts.CaseClause, _arrName: string): number {\n function walk(node: ts.Node): number {\n if (ts.isForStatement(node) && node.incrementor) {\n // Check incrementor: i += STRIDE\n const inc = node.incrementor\n if (\n ts.isBinaryExpression(inc) &&\n inc.operatorToken.kind === ts.SyntaxKind.PlusEqualsToken &&\n ts.isNumericLiteral(inc.right)\n ) {\n const stride = parseInt(inc.right.text, 10)\n if (stride > 1) return stride\n }\n }\n return ts.forEachChild(node, walk) ?? 0\n }\n for (const stmt of clause.statements) {\n const result = walk(stmt)\n if (result > 0) return result\n }\n return 0\n}\n\nfunction hasSliceAssignment(clause: ts.CaseClause, varName: string): boolean {\n function walk(node: ts.Node): boolean {\n // Look for: const varName = stateName.field.slice()\n if (\n ts.isVariableDeclaration(node) &&\n ts.isIdentifier(node.name) &&\n node.name.text === varName &&\n node.initializer\n ) {\n const init = node.initializer\n if (\n ts.isCallExpression(init) &&\n ts.isPropertyAccessExpression(init.expression) &&\n init.expression.name.text === 'slice'\n ) {\n return true\n }\n }\n return ts.forEachChild(node, walk) ?? false\n }\n for (const stmt of clause.statements) {\n if (walk(stmt)) return true\n }\n return false\n}\n\n/**\n * Analyze which top-level state fields are modified in a return expression.\n * Returns the set of field names, or null if too complex to determine.\n */\nfunction analyzeModifiedFields(\n stateExpr: ts.Expression,\n stateName: string,\n topLevelBits: Map<string, number>,\n topLevelBitsHi: Map<string, number> = new Map(),\n): string[] | null {\n // Recognize fields tracked in EITHER the low-word or high-word map.\n // 32..61-prefix components have their overflow paths in\n // `topLevelBitsHi`; the case handler's `caseDirty` / `caseDirtyHi`\n // logic depends on us recognizing those fields here.\n const isTracked = (name: string): boolean => topLevelBits.has(name) || topLevelBitsHi.has(name)\n // Pattern: { ...state, field1: ..., field2: ... } or { field1: ..., field2: ... }\n if (ts.isObjectLiteralExpression(stateExpr)) {\n const modified: string[] = []\n for (const prop of stateExpr.properties) {\n if (ts.isSpreadAssignment(prop)) {\n // Only `...state` is safe to ignore — re-spreading state back into\n // state doesn't change any field's identity. ANY other spread\n // (e.g. `...msg.props`, `...someObj`) can overwrite arbitrary\n // top-level fields with new references, and we cannot know which\n // ones statically. Bail out so the generic Phase 2 path runs\n // `__dirty` at runtime and produces a correct mask.\n if (ts.isIdentifier(prop.expression) && prop.expression.text === stateName) {\n continue\n }\n return null\n }\n if (ts.isPropertyAssignment(prop) && ts.isIdentifier(prop.name)) {\n const fieldName = prop.name.text\n if (isTracked(fieldName)) {\n modified.push(fieldName)\n }\n }\n // Handle shorthand: { ...state, rows } where rows is a local variable\n if (ts.isShorthandPropertyAssignment(prop)) {\n const fieldName = prop.name.text\n if (isTracked(fieldName)) {\n modified.push(fieldName)\n }\n }\n }\n return modified.length > 0 ? modified : null\n }\n\n // Pattern: state (no change — early return)\n if (ts.isIdentifier(stateExpr) && stateExpr.text === stateName) {\n return [] // no fields modified\n }\n\n return null // too complex\n}\n\n/**\n * Build a handler function for a specific message type case.\n *\n * Generated: (inst, msg) => {\n * const [s, e] = inst.def.update(inst.state, msg)\n * inst.state = s\n * const bl = inst.structuralBlocks, b = inst.allBindings, p = b.length\n * // Phase 1: gated by caseDirty\n * for (let i = 0; i < bl.length; i++) {\n * if (bl[i].mask & caseDirty) bl[i].reconcile(s, caseDirty)\n * }\n * // Phase 2\n * __runPhase2(s, caseDirty, b, p)\n * return [s, e]\n * }\n */\n/**\n * Build a handler that delegates to __handleMsg(inst, msg, dirty, method).\n * method: 0=reconcile, 1=reconcileItems, 2=reconcileClear, 3=reconcileRemove, -1=skip blocks\n */\nfunction buildCaseHandler(\n f: ts.NodeFactory,\n caseDirty: number,\n caseDirtyHi: number,\n arrayOp: ArrayOp,\n): ts.ArrowFunction {\n const method =\n typeof arrayOp === 'object' && arrayOp.type === 'strided'\n ? 10 + arrayOp.stride // reconcileChanged with stride\n : arrayOp === 'none'\n ? -1\n : arrayOp === 'mutate'\n ? 1\n : arrayOp === 'clear'\n ? 2\n : arrayOp === 'remove'\n ? 3\n : 0 // general\n\n // (inst, msg) => __handleMsg(inst, msg, dirty, method, [dirtyHi])\n const args: ts.Expression[] = [\n f.createIdentifier('inst'),\n f.createIdentifier('msg'),\n createMaskLiteral(f, caseDirty),\n method >= 0\n ? f.createNumericLiteral(method)\n : f.createPrefixUnaryExpression(ts.SyntaxKind.MinusToken, f.createNumericLiteral(1)),\n ]\n // Emit the 5th positional arg only when the case touches a high-word\n // field. Stale runtime bundles' _handleMsg signatures ignored that\n // slot anyway; new ones (defaulted to 0) make it explicit when needed.\n if (caseDirtyHi !== 0) args.push(createMaskLiteral(f, caseDirtyHi))\n return f.createArrowFunction(\n undefined,\n undefined,\n [\n f.createParameterDeclaration(undefined, undefined, 'inst'),\n f.createParameterDeclaration(undefined, undefined, 'msg'),\n ],\n undefined,\n f.createToken(ts.SyntaxKind.EqualsGreaterThanToken),\n f.createCallExpression(f.createIdentifier('__handleMsg'), undefined, args),\n )\n}\n\n/**\n * Compute the OR of all structural block masks found in the view function.\n * Returns FULL_MASK if any structural block uses FULL_MASK or if no blocks found.\n */\nfunction computeStructuralMask(\n configArg: ts.ObjectLiteralExpression,\n fieldBits: Map<string, number>,\n): number {\n const viewProp = configArg.properties.find(\n (p) => ts.isPropertyAssignment(p) && ts.isIdentifier(p.name) && p.name.text === 'view',\n )\n if (!viewProp || !ts.isPropertyAssignment(viewProp)) return 0xffffffff | 0\n\n let mask = 0\n let foundStructural = false\n\n function walk(node: ts.Node): void {\n if (ts.isCallExpression(node)) {\n const name = ts.isIdentifier(node.expression) ? node.expression.text : ''\n if (['each', 'branch', 'scope', 'show'].includes(name) && node.arguments[0]) {\n foundStructural = true\n const opts = node.arguments[0]\n if (ts.isObjectLiteralExpression(opts)) {\n // Check for __mask property (already injected by tryInjectStructuralMask)\n for (const prop of opts.properties) {\n if (\n ts.isPropertyAssignment(prop) &&\n ts.isIdentifier(prop.name) &&\n prop.name.text === '__mask'\n ) {\n if (ts.isNumericLiteral(prop.initializer)) {\n mask |= parseInt(prop.initializer.text, 10)\n return\n }\n if (ts.isPrefixUnaryExpression(prop.initializer)) {\n // Handle negative literals like -1\n mask = 0xffffffff | 0\n return\n }\n }\n }\n // No __mask found — use driving accessor mask\n const driverProp = name === 'each' ? 'items' : name === 'branch' ? 'on' : 'when'\n for (const prop of opts.properties) {\n if (\n ts.isPropertyAssignment(prop) &&\n ts.isIdentifier(prop.name) &&\n prop.name.text === driverProp\n ) {\n if (\n ts.isArrowFunction(prop.initializer) ||\n ts.isFunctionExpression(prop.initializer)\n ) {\n const { mask: m } = computeAccessorMask(prop.initializer, fieldBits)\n mask |= m || 0xffffffff | 0\n }\n break\n }\n }\n }\n }\n }\n ts.forEachChild(node, walk)\n }\n\n walk(viewProp.initializer)\n return foundStructural ? mask || 0xffffffff | 0 : 0\n}\n\n/**\n * Build the `__prefixes` property assignment from path → bit maps.\n *\n * Emits one arrow `(s) => s.<path>` per distinct path. Array index =\n * the path's bit position: positions 0..30 come from `fieldBits` (low\n * word), positions 31..61 from `fieldBitsHi` (high word). The runtime\n * walks this array and reference-compares `prefix(prev)` vs\n * `prefix(next)` per entry, fanning bits into a `(lo, hi)` pair when\n * the array length exceeds 31.\n *\n * Returns null if no paths are present.\n */\nfunction buildPrefixesProp(\n fieldBits: Map<string, number>,\n fieldBitsHi: Map<string, number>,\n f: ts.NodeFactory,\n): ts.PropertyAssignment | null {\n if (fieldBits.size === 0 && fieldBitsHi.size === 0) return null\n // Sort paths by bit value within each word. Bits are powers of two\n // inside their word (1, 2, 4, …, 1<<30), so sorting numerically gives\n // ascending bit position. FULL_MASK (-1) entries from past-61\n // overflow shouldn't drive a prefix entry — defensively skip them.\n const orderedLo = [...fieldBits.entries()]\n .filter(([, bit]) => bit > 0)\n .sort(([, a], [, b]) => a - b)\n const orderedHi = [...fieldBitsHi.entries()].sort(([, a], [, b]) => a - b)\n const buildArrow = (path: string): ts.ArrowFunction => {\n const parts = path.split('.')\n const body = buildAccess(f, 's', parts)\n return f.createArrowFunction(\n undefined,\n undefined,\n [f.createParameterDeclaration(undefined, undefined, 's')],\n undefined,\n f.createToken(ts.SyntaxKind.EqualsGreaterThanToken),\n body,\n )\n }\n const arrows = [\n ...orderedLo.map(([path]) => buildArrow(path)),\n ...orderedHi.map(([path]) => buildArrow(path)),\n ]\n return f.createPropertyAssignment('__prefixes', f.createArrayLiteralExpression(arrows, false))\n}\n\nfunction buildAccess(f: ts.NodeFactory, root: string, parts: string[]): ts.Expression {\n let expr: ts.Expression = f.createIdentifier(root)\n for (const part of parts) {\n // Use optional chaining for nested paths\n if (parts.length > 1) {\n expr = f.createPropertyAccessChain(expr, f.createToken(ts.SyntaxKind.QuestionDotToken), part)\n } else {\n expr = f.createPropertyAccessExpression(expr, part)\n }\n }\n return expr\n}\n"]}
|
|
1
|
+
{"version":3,"file":"core-synthesis.js","sourceRoot":"","sources":["../../src/modules/core-synthesis.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,wEAAwE;AACxE,iEAAiE;AACjE,yEAAyE;AACzE,EAAE;AACF,uEAAuE;AACvE,2DAA2D;AAC3D,iEAAiE;AACjE,wEAAwE;AACxE,qEAAqE;AACrE,sEAAsE;AACtE,sEAAsE;AACtE,EAAE;AACF,sEAAsE;AACtE,wDAAwD;AACxD,8DAA8D;AAC9D,iEAAiE;AACjE,kEAAkE;AAClE,sEAAsE;AACtE,iCAAiC;AACjC,EAAE;AACF,mEAAmE;AACnE,qEAAqE;AACrE,wEAAwE;AACxE,iDAAiD;AAEjD,OAAO,EAAE,MAAM,YAAY,CAAA;AAE3B,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MA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,IAAI,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;KAC1D,CAAA;IACD,kEAAkE;IAClE,iEAAiE;IACjE,mEAAmE;IACnE,kEAAkE;IAClE,gEAAgE;IAChE,6DAA6D;IAC7D,8DAA8D;IAC9D,8DAA8D;IAC9D,8BAA8B;IAC9B,IAAI,iBAAiB;QAAE,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAA;IAClD,OAAO,CAAC,CAAC,wBAAwB,CAAC,YAAY,EAAE,CAAC,CAAC,4BAA4B,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAA;AAChG,CAAC;AAED,SAAS,WAAW,CAAC,CAAiB,EAAE,IAAY,EAAE,KAAe;IACnE,IAAI,IAAI,GAAkB,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAA;IAClD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,yCAAyC;QACzC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACrB,IAAI,GAAG,CAAC,CAAC,yBAAyB,CAAC,IAAI,EAAE,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE,IAAI,CAAC,CAAA;QAC/F,CAAC;aAAM,CAAC;YACN,IAAI,GAAG,CAAC,CAAC,8BAA8B,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;QACrD,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC","sourcesContent":["// `core-synthesis` — owns the co-emitted core trio:\n// - `__update` — Phase 1/2 dispatcher; reads `structuralMask`\n// - `__handlers` — per-message-type specialized handlers\n// - `__prefixes` — array of path-keyed reference-stable closures\n//\n// The three are NOT decomposable into separate modules (per v2c §7.9.2\n// design decision (a) vs (b)): they share `topLevelBits` /\n// `structuralMask` / `fieldBits` intermediates, and `__prefixes`\n// ordering is bit-position-keyed (the array index *is* the bit position\n// used by every binding's mask). Producing them in three independent\n// emit passes would either duplicate the analysis or require a shared\n// scratchpad slot — both lose vs the function's existing single pass.\n//\n// So this module owns the entire synthesis: `tryInjectDirty` plus its\n// ~600 lines of supporting helpers (`tryBuildHandlers`,\n// `buildCaseHandler`, `buildUpdateBody`, `buildPrefixesProp`,\n// `computeStructuralMask`, `buildAccess`, plus the case-analysis\n// helpers `detectArrayOp`, `findReturnArray`, `detectStrideLoop`,\n// `hasSliceAssignment`, `analyzeModifiedFields`). Moved verbatim from\n// transform.ts in v2c/decomp-21.\n//\n// Side-effect: the inline call sets `usesApplyBinding = true` when\n// the rewrite fires (drives `__runPhase2` + `__handleMsg` imports in\n// `cleanupImports`). The module surfaces this via `CORE_SYNTHESIS_SLOT`\n// for the umbrella to read after `registry.run`.\n\nimport ts from 'typescript'\nimport type { CompilerModule } from '../module.js'\nimport { computeAccessorMask, createMaskLiteral, isComponentCall } from '../transform.js'\n\nexport interface CoreSynthesisModuleOptions {\n fieldBits: Map<string, number>\n fieldBitsHi: Map<string, number>\n /** Component() call detection requires the @llui/dom import binding\n * to disambiguate from user-local `component` identifiers. */\n lluiImport: ts.ImportDeclaration\n /** At least one reactive accessor in the file flows the state\n * identifier into an expression the walker can't trace (opaque\n * callee, spread, ternary branch, dynamic key, …). Forces emission\n * of a `(s) => s` whole-state sentinel at the tail of `__prefixes`\n * so FULL_MASK bindings catch a dirty bit on every update,\n * regardless of which fields the opaque expression actually reads. */\n hasOpaqueAccessor?: boolean\n}\n\nexport interface CoreSynthesisSlot {\n /** True when at least one component() call got the __update/__handlers/__prefixes\n * trio injected — drives `cleanupImports`'s decision about `__runPhase2`\n * + `__handleMsg` runtime imports. */\n usesApplyBinding: boolean\n}\n\nexport const CORE_SYNTHESIS_SLOT = 'core-synthesis:state'\n\nexport function coreSynthesisModule(opts: CoreSynthesisModuleOptions): CompilerModule {\n const { fieldBits, fieldBitsHi, lluiImport, hasOpaqueAccessor = false } = opts\n return {\n name: 'core-synthesis',\n compilerVersion: '^0.3.0',\n diagnostics: [],\n visitors: {},\n\n transformCallEnter(ctx, node) {\n if (!isComponentCall(node, lluiImport)) return null\n const rewritten = tryInjectDirty(node, fieldBits, ctx.factory, fieldBitsHi, hasOpaqueAccessor)\n if (!rewritten) return null\n const slot = ctx.analysis.perModule.get(CORE_SYNTHESIS_SLOT) as CoreSynthesisSlot | undefined\n if (slot) slot.usesApplyBinding = true\n else\n ctx.analysis.perModule.set(CORE_SYNTHESIS_SLOT, {\n usesApplyBinding: true,\n } as CoreSynthesisSlot)\n return rewritten\n },\n }\n}\n\n// ─── Synthesis implementation (moved verbatim from transform.ts) ────\n\nfunction tryInjectDirty(\n node: ts.CallExpression,\n fieldBits: Map<string, number>,\n f: ts.NodeFactory,\n fieldBitsHi: Map<string, number> = new Map(),\n hasOpaqueAccessor: boolean = false,\n): ts.CallExpression | null {\n if (fieldBits.size === 0 && fieldBitsHi.size === 0 && !hasOpaqueAccessor) return null\n const configArg = node.arguments[0]\n if (!configArg || !ts.isObjectLiteralExpression(configArg)) return null\n\n // Check if __dirty already exists\n for (const prop of configArg.properties) {\n if (\n ts.isPropertyAssignment(prop) &&\n ts.isIdentifier(prop.name) &&\n prop.name.text === '__dirty'\n ) {\n return null\n }\n }\n\n // Top-level field → aggregated bit mask. Sub-paths under one field\n // (`route.page`, `route.data`) collapse into a single entry so\n // `tryBuildHandlers` can reason per-field. Positions 0..30 live here;\n // 31..61 in the parallel high-word map below. `__maskLegend` itself\n // is now owned by `maskLegendModule` (v2c/decomp-9).\n const topLevelBits = new Map<string, number>()\n for (const [path, bit] of fieldBits) {\n const topField = path.split('.')[0]!\n topLevelBits.set(topField, (topLevelBits.get(topField) ?? 0) | bit)\n }\n const topLevelBitsHi = new Map<string, number>()\n for (const [path, bit] of fieldBitsHi) {\n const topField = path.split('.')[0]!\n topLevelBitsHi.set(topField, (topLevelBitsHi.get(topField) ?? 0) | bit)\n }\n\n // Structural mask — used by __handlers.\n const structuralMask = computeStructuralMask(configArg, fieldBits)\n\n // v0.4 size-cut (Tier 2.4): the `__update` fast-path emission was\n // removed. Empirically (see benchmarks/bundle-baseline.json + the\n // strategy comparison in earlier work) it provided only ~3% wall-time\n // improvement on a 200-binding sparse-update workload, but cost 200-400\n // bytes per compiled component plus the dispatch branch in\n // processMessages. The runtime always uses genericUpdate now.\n\n // __handlers: per-message-type specialized update functions.\n // Analyzes the update() switch/case and generates direct handlers\n // that bypass the generic Phase 1/2 pipeline for single-message updates.\n // Tier 5 (drop __handlers) was attempted and REVERTED — see\n // benchmarks/bundle-baseline.json#/abandoned. The 1.4 kB savings cost\n // 23-89% perf on jfb's swap/remove/update/select.\n const handlersProp = tryBuildHandlers(configArg, topLevelBits, topLevelBitsHi, structuralMask, f)\n\n // `__maskLegend` is emitted by `maskLegendModule` via the registry\n // bridge (v2c/decomp-9); the umbrella's `applyRegistryEmissions` step\n // splices it into the same config-arg literal we return here.\n const extraProps: ts.ObjectLiteralElementLike[] = []\n if (handlersProp) extraProps.push(handlersProp)\n\n // __prefixes: opt-in path-keyed reactivity (see\n // docs/proposals/unified-composition-model.md). One closure per\n // distinct path that an accessor reads, hoisted into a stable array;\n // the array position IS the bit position used by the path's bindings.\n // The runtime prefers __prefixes when present and computes the\n // combinedDirty mask by reference-comparing `prefix(prev)` vs\n // `prefix(next)` for each entry — strictly more precise than the\n // top-level-conflated __dirty (which always co-fires bindings sharing\n // a top-level field even when only one sub-path actually mutated).\n //\n // Emit `__prefixes` whenever any reactive paths are present. For\n // components with ≤31 paths, the runtime's\n // `computeDirtyFromPrefixes` returns a single `number`; for\n // 32..61-path components it returns a `[lo, hi]` tuple that the\n // runtime fans out into `combinedDirty` + `combinedDirtyHi`. The\n // binding-level mask gating is still single-word at the compiler\n // emit layer today, so high-position bindings still re-evaluate\n // every cycle — but the dirty computation itself is now precise,\n // which lets memo()'d aggregates short-circuit correctly.\n const prefixesProp = buildPrefixesProp(fieldBits, fieldBitsHi, f, hasOpaqueAccessor)\n if (prefixesProp) extraProps.push(prefixesProp)\n\n const newConfig = f.createObjectLiteralExpression([...configArg.properties, ...extraProps], true)\n\n // `updateCallExpression` (not `createCallExpression`) so the new\n // node inherits `node.pos` / `node.end` from the original. Phase 2b\n // downstream consumers (componentMetaModule, etc.) read pos via\n // `getStart(sf)` for line info; a synthetic node (pos=-1) would\n // collapse every `component()` call's `__componentMeta.line` to 0.\n return f.updateCallExpression(node, node.expression, node.typeArguments, [\n newConfig,\n ...node.arguments.slice(1),\n ])\n}\n\n/**\n * Analyze update() switch/case and generate per-message-type handlers.\n *\n * Each handler receives (inst, msg) and returns [newState, effects].\n * The handler calls update() to get the new state, then directly invokes\n * the appropriate runtime primitives (reconcileItems, __directUpdate, etc.)\n * instead of going through the generic Phase 1/2 pipeline.\n *\n * Conservative: only generates handlers for cases where the field\n * modifications are statically determinable. Complex cases are skipped.\n */\nfunction tryBuildHandlers(\n configArg: ts.ObjectLiteralExpression,\n topLevelBits: Map<string, number>,\n topLevelBitsHi: Map<string, number>,\n structuralMask: number,\n f: ts.NodeFactory,\n): ts.PropertyAssignment | null {\n if (topLevelBits.size === 0 && topLevelBitsHi.size === 0) return null\n\n // Find the update function in the component config\n let updateFn: ts.ArrowFunction | ts.FunctionExpression | null = null\n for (const prop of configArg.properties) {\n if (\n ts.isPropertyAssignment(prop) &&\n ts.isIdentifier(prop.name) &&\n prop.name.text === 'update'\n ) {\n if (ts.isArrowFunction(prop.initializer) || ts.isFunctionExpression(prop.initializer)) {\n updateFn = prop.initializer\n }\n break\n }\n }\n if (!updateFn) return null\n\n // Find the switch statement in the update body\n const body = ts.isBlock(updateFn.body) ? updateFn.body : null\n if (!body) return null\n\n let switchStmt: ts.SwitchStatement | null = null\n for (const stmt of body.statements) {\n if (ts.isSwitchStatement(stmt)) {\n switchStmt = stmt\n break\n }\n }\n if (!switchStmt) return null\n\n // Check the switch discriminant is msg.type pattern\n const stateParam = updateFn.parameters[0]?.name\n const msgParam = updateFn.parameters[1]?.name\n if (!stateParam || !msgParam || !ts.isIdentifier(stateParam) || !ts.isIdentifier(msgParam))\n return null\n const stateName = stateParam.text\n\n // Analyze each case clause\n const handlers: ts.PropertyAssignment[] = []\n\n for (const clause of switchStmt.caseBlock.clauses) {\n if (!ts.isCaseClause(clause)) continue\n\n // Extract the case label — must be a string literal like 'select'\n if (!ts.isStringLiteral(clause.expression)) continue\n const msgType = clause.expression.text\n\n // Collect ALL return [newState, effects] statements recursively from the\n // case body. Multiple returns (from if/else branches) must all be analyzed\n // so the handler's dirty mask covers every possible modified field.\n const returnExprs: ts.ArrayLiteralExpression[] = []\n const collectReturns = (node: ts.Node): void => {\n if (\n ts.isReturnStatement(node) &&\n node.expression &&\n ts.isArrayLiteralExpression(node.expression) &&\n node.expression.elements.length >= 2\n ) {\n returnExprs.push(node.expression)\n return\n }\n // Don't descend into nested functions — their returns are unrelated.\n if (\n ts.isFunctionDeclaration(node) ||\n ts.isFunctionExpression(node) ||\n ts.isArrowFunction(node) ||\n ts.isMethodDeclaration(node)\n ) {\n return\n }\n ts.forEachChild(node, collectReturns)\n }\n for (const stmt of clause.statements) {\n collectReturns(stmt)\n }\n if (returnExprs.length === 0) continue\n\n // Union modified fields across all return paths.\n const allModified = new Set<string>()\n let bailOut = false\n for (const returnExpr of returnExprs) {\n const stateExpr = returnExpr.elements[0]!\n const fields = analyzeModifiedFields(stateExpr, stateName, topLevelBits, topLevelBitsHi)\n if (!fields) {\n bailOut = true\n break\n }\n for (const f of fields) allModified.add(f)\n }\n if (bailOut) continue // at least one return path was too complex\n\n const modifiedFields = Array.from(allModified)\n\n // Compute the dirty mask for this case across both words. Fields\n // tracked in `topLevelBitsHi` contribute to `caseDirtyHi`; fields\n // tracked nowhere (`undefined` lookup in both) fall back to\n // FULL_MASK in the low word — same conservative behavior as\n // before, just preserved per-word now.\n let caseDirty = 0\n let caseDirtyHi = 0\n for (const field of modifiedFields) {\n const lo = topLevelBits.get(field)\n const hi = topLevelBitsHi.get(field)\n if (lo === undefined && hi === undefined) {\n caseDirty |= 0xffffffff | 0\n } else {\n if (lo !== undefined) caseDirty |= lo\n if (hi !== undefined) caseDirtyHi |= hi\n }\n }\n\n // Detect array operation pattern for structural block optimization\n const arrayOp = detectArrayOp(clause, modifiedFields, structuralMask, caseDirty)\n\n const handler = buildCaseHandler(f, caseDirty, caseDirtyHi, arrayOp)\n handlers.push(f.createPropertyAssignment(f.createStringLiteral(msgType), handler))\n }\n\n if (handlers.length === 0) return null\n\n return f.createPropertyAssignment('__handlers', f.createObjectLiteralExpression(handlers, true))\n}\n\ntype ArrayOp =\n | 'none'\n | 'clear'\n | 'mutate'\n | 'remove'\n | 'general'\n | { type: 'strided'; stride: number } // for (i = 0; i < len; i += stride) pattern\n\n/**\n * Detect the array operation pattern in a case body.\n * - 'none': no array field modified (e.g., only `selected` changes)\n * - 'clear': array set to empty literal `[]`\n * - 'mutate': array created via `.slice()` then mutated in place (same keys)\n * - 'general': unknown pattern, use generic reconcile\n */\nfunction detectArrayOp(\n clause: ts.CaseClause,\n modifiedFields: string[],\n _structuralMask?: number,\n _caseDirty?: number,\n): ArrayOp {\n // No fields modified → no Phase 1 needed (no bindings can care if no\n // state field changed). Safe to return 'none' here because it's a\n // tautology: every binding mask ANDed with zero is zero.\n if (modifiedFields.length === 0) return 'none'\n\n // The specialized methods (`reconcileClear`, `reconcileItems`,\n // `reconcileRemove`, `reconcileChanged`) only exist on `each` blocks.\n // Non-each blocks (`show`, `branch`, `scope`) leave them undefined,\n // so a method other than 0 (general reconcile) silently no-ops on\n // those blocks at runtime. If the case modifies fields BEYOND the\n // array op (e.g. `{ ...state, open: true, name: '', tags: [] }`),\n // any show/branch block whose mask intersects the case's dirty bits\n // would be selected for reconcile but then skipped by the no-op\n // method invocation — its `when`/`on` accessor never re-evaluates,\n // and the component appears structurally inert after mount.\n //\n // Conservative correctness: only emit a non-general method when the\n // array op is the SOLE field modification. With one modified field,\n // the only blocks selected by mask gating are ones that read that\n // single field — and the optimization is well-defined for that\n // narrow case (each blocks operating on the array). Multi-field\n // cases fall through to `'general'` (method=0), so every selected\n // block runs the standard `reconcile` path. We trade a niche\n // optimization (small benefit even when applicable) for guaranteed\n // structural reconciliation across the framework's primitive set.\n //\n // Sister of show-helper-reconcile.test.ts, which fixed the same\n // class of bug on the method=-1 path. Same architectural principle:\n // the compiler can't see every block in the view, so optimizations\n // that route around `reconcile` must be ironclad. When in doubt,\n // emit method=0 and let `_handleMsg`'s per-block mask gate filter.\n //\n // Previously: if `(structuralMask & caseDirty) === 0`, return 'none'\n // on the theory that no structural block's mask could intersect this\n // case's dirty bits. That optimization was UNSAFE: `computeStructuralMask`\n // only walks the view function's lexical AST and does not descend into\n // helper function calls. A view like\n //\n // view: () => [\n // ...show({ when: s => s.mode === 'signin', render: () => [signinFormBody()] }),\n // ]\n //\n // where `signinFormBody()` is a helper that internally does\n // ...show({ when: s => s.errors.email !== undefined, ... })\n //\n // produces a `structuralMask` that covers `mode` but MISSES\n // `errors.email`. At runtime the inner show block is still registered\n // in `inst.structuralBlocks`, and it legitimately needs to reconcile\n // when `errors` changes — but the compiler was emitting `method = -1`\n // (skip blocks entirely) for cases that only touch `errors`, and the\n // error paragraphs would never mount.\n if (modifiedFields.length !== 1) return 'general'\n const onlyField = modifiedFields[0]!\n\n // Look at the return expression's array field values\n for (const stmt of clause.statements) {\n const returnExpr = findReturnArray(stmt)\n if (!returnExpr) continue\n\n const stateExpr = returnExpr.elements[0]\n if (!stateExpr || !ts.isObjectLiteralExpression(stateExpr)) continue\n\n for (const prop of stateExpr.properties) {\n const name =\n ts.isPropertyAssignment(prop) && ts.isIdentifier(prop.name)\n ? prop.name.text\n : ts.isShorthandPropertyAssignment(prop)\n ? prop.name.text\n : null\n if (!name) continue\n // The optimization only applies when the array op is on the\n // single tracked field. A `field: []` on a different field\n // (one not in modifiedFields, e.g. an untracked field) would\n // still no-op safely on each blocks via the mask gate, but to\n // keep the analysis tight we require an exact match.\n if (name !== onlyField) continue\n\n // Check for empty array literal: `field: []`\n if (\n ts.isPropertyAssignment(prop) &&\n ts.isArrayLiteralExpression(prop.initializer) &&\n prop.initializer.elements.length === 0\n ) {\n return 'clear'\n }\n\n // Check for shorthand `field` where field was assigned via `.slice()` earlier\n // This catches: `const rows = state.rows.slice(); rows[i] = ...; return { ...state, rows }`\n if (ts.isShorthandPropertyAssignment(prop)) {\n const varName = prop.name.text\n if (hasSliceAssignment(clause, varName)) {\n // Check for strided for-loop: for (let i = 0; i < arr.length; i += STRIDE)\n const stride = detectStrideLoop(clause, varName)\n if (stride > 1) return { type: 'strided', stride }\n return 'mutate'\n }\n }\n\n // Check for property assignment with filter: `field: state.field.filter(...)`\n if (ts.isPropertyAssignment(prop) && ts.isCallExpression(prop.initializer)) {\n const call = prop.initializer\n if (\n ts.isPropertyAccessExpression(call.expression) &&\n call.expression.name.text === 'filter'\n ) {\n return 'remove'\n }\n }\n }\n }\n\n return 'general'\n}\n\nfunction findReturnArray(stmt: ts.Statement): ts.ArrayLiteralExpression | null {\n if (ts.isReturnStatement(stmt) && stmt.expression && ts.isArrayLiteralExpression(stmt.expression))\n return stmt.expression\n if (ts.isBlock(stmt)) {\n for (const inner of stmt.statements) {\n const result = findReturnArray(inner)\n if (result) return result\n }\n }\n return null\n}\n\n/**\n * Detect a strided for-loop: `for (let i = 0; i < arr.length; i += STRIDE)`\n * where `arr` is the named variable. Returns the stride or 0 if not found.\n */\nfunction detectStrideLoop(clause: ts.CaseClause, _arrName: string): number {\n function walk(node: ts.Node): number {\n if (ts.isForStatement(node) && node.incrementor) {\n // Check incrementor: i += STRIDE\n const inc = node.incrementor\n if (\n ts.isBinaryExpression(inc) &&\n inc.operatorToken.kind === ts.SyntaxKind.PlusEqualsToken &&\n ts.isNumericLiteral(inc.right)\n ) {\n const stride = parseInt(inc.right.text, 10)\n if (stride > 1) return stride\n }\n }\n return ts.forEachChild(node, walk) ?? 0\n }\n for (const stmt of clause.statements) {\n const result = walk(stmt)\n if (result > 0) return result\n }\n return 0\n}\n\nfunction hasSliceAssignment(clause: ts.CaseClause, varName: string): boolean {\n function walk(node: ts.Node): boolean {\n // Look for: const varName = stateName.field.slice()\n if (\n ts.isVariableDeclaration(node) &&\n ts.isIdentifier(node.name) &&\n node.name.text === varName &&\n node.initializer\n ) {\n const init = node.initializer\n if (\n ts.isCallExpression(init) &&\n ts.isPropertyAccessExpression(init.expression) &&\n init.expression.name.text === 'slice'\n ) {\n return true\n }\n }\n return ts.forEachChild(node, walk) ?? false\n }\n for (const stmt of clause.statements) {\n if (walk(stmt)) return true\n }\n return false\n}\n\n/**\n * Analyze which top-level state fields are modified in a return expression.\n * Returns the set of field names, or null if too complex to determine.\n */\nfunction analyzeModifiedFields(\n stateExpr: ts.Expression,\n stateName: string,\n topLevelBits: Map<string, number>,\n topLevelBitsHi: Map<string, number> = new Map(),\n): string[] | null {\n // Recognize fields tracked in EITHER the low-word or high-word map.\n // 32..61-prefix components have their overflow paths in\n // `topLevelBitsHi`; the case handler's `caseDirty` / `caseDirtyHi`\n // logic depends on us recognizing those fields here.\n const isTracked = (name: string): boolean => topLevelBits.has(name) || topLevelBitsHi.has(name)\n // Pattern: { ...state, field1: ..., field2: ... } or { field1: ..., field2: ... }\n if (ts.isObjectLiteralExpression(stateExpr)) {\n const modified: string[] = []\n for (const prop of stateExpr.properties) {\n if (ts.isSpreadAssignment(prop)) {\n // Only `...state` is safe to ignore — re-spreading state back into\n // state doesn't change any field's identity. ANY other spread\n // (e.g. `...msg.props`, `...someObj`) can overwrite arbitrary\n // top-level fields with new references, and we cannot know which\n // ones statically. Bail out so the generic Phase 2 path runs\n // `__dirty` at runtime and produces a correct mask.\n if (ts.isIdentifier(prop.expression) && prop.expression.text === stateName) {\n continue\n }\n return null\n }\n if (ts.isPropertyAssignment(prop) && ts.isIdentifier(prop.name)) {\n const fieldName = prop.name.text\n if (isTracked(fieldName)) {\n modified.push(fieldName)\n }\n }\n // Handle shorthand: { ...state, rows } where rows is a local variable\n if (ts.isShorthandPropertyAssignment(prop)) {\n const fieldName = prop.name.text\n if (isTracked(fieldName)) {\n modified.push(fieldName)\n }\n }\n }\n return modified.length > 0 ? modified : null\n }\n\n // Pattern: state (no change — early return)\n if (ts.isIdentifier(stateExpr) && stateExpr.text === stateName) {\n return [] // no fields modified\n }\n\n return null // too complex\n}\n\n/**\n * Build a handler function for a specific message type case.\n *\n * Generated: (inst, msg) => {\n * const [s, e] = inst.def.update(inst.state, msg)\n * inst.state = s\n * const bl = inst.structuralBlocks, b = inst.allBindings, p = b.length\n * // Phase 1: gated by caseDirty\n * for (let i = 0; i < bl.length; i++) {\n * if (bl[i].mask & caseDirty) bl[i].reconcile(s, caseDirty)\n * }\n * // Phase 2\n * __runPhase2(s, caseDirty, b, p)\n * return [s, e]\n * }\n */\n/**\n * Build a handler that delegates to __handleMsg(inst, msg, dirty, method).\n * method: 0=reconcile, 1=reconcileItems, 2=reconcileClear, 3=reconcileRemove, -1=skip blocks\n */\nfunction buildCaseHandler(\n f: ts.NodeFactory,\n caseDirty: number,\n caseDirtyHi: number,\n arrayOp: ArrayOp,\n): ts.ArrowFunction {\n const method =\n typeof arrayOp === 'object' && arrayOp.type === 'strided'\n ? 10 + arrayOp.stride // reconcileChanged with stride\n : arrayOp === 'none'\n ? -1\n : arrayOp === 'mutate'\n ? 1\n : arrayOp === 'clear'\n ? 2\n : arrayOp === 'remove'\n ? 3\n : 0 // general\n\n // (inst, msg) => __handleMsg(inst, msg, dirty, method, [dirtyHi])\n const args: ts.Expression[] = [\n f.createIdentifier('inst'),\n f.createIdentifier('msg'),\n createMaskLiteral(f, caseDirty),\n method >= 0\n ? f.createNumericLiteral(method)\n : f.createPrefixUnaryExpression(ts.SyntaxKind.MinusToken, f.createNumericLiteral(1)),\n ]\n // Emit the 5th positional arg only when the case touches a high-word\n // field. Stale runtime bundles' _handleMsg signatures ignored that\n // slot anyway; new ones (defaulted to 0) make it explicit when needed.\n if (caseDirtyHi !== 0) args.push(createMaskLiteral(f, caseDirtyHi))\n return f.createArrowFunction(\n undefined,\n undefined,\n [\n f.createParameterDeclaration(undefined, undefined, 'inst'),\n f.createParameterDeclaration(undefined, undefined, 'msg'),\n ],\n undefined,\n f.createToken(ts.SyntaxKind.EqualsGreaterThanToken),\n f.createCallExpression(f.createIdentifier('__handleMsg'), undefined, args),\n )\n}\n\n/**\n * Compute the OR of all structural block masks found in the view function.\n * Returns FULL_MASK if any structural block uses FULL_MASK or if no blocks found.\n */\nfunction computeStructuralMask(\n configArg: ts.ObjectLiteralExpression,\n fieldBits: Map<string, number>,\n): number {\n const viewProp = configArg.properties.find(\n (p) => ts.isPropertyAssignment(p) && ts.isIdentifier(p.name) && p.name.text === 'view',\n )\n if (!viewProp || !ts.isPropertyAssignment(viewProp)) return 0xffffffff | 0\n\n let mask = 0\n let foundStructural = false\n\n function walk(node: ts.Node): void {\n if (ts.isCallExpression(node)) {\n const name = ts.isIdentifier(node.expression) ? node.expression.text : ''\n if (['each', 'branch', 'scope', 'show'].includes(name) && node.arguments[0]) {\n foundStructural = true\n const opts = node.arguments[0]\n if (ts.isObjectLiteralExpression(opts)) {\n // Check for __mask property (already injected by tryInjectStructuralMask)\n for (const prop of opts.properties) {\n if (\n ts.isPropertyAssignment(prop) &&\n ts.isIdentifier(prop.name) &&\n prop.name.text === '__mask'\n ) {\n if (ts.isNumericLiteral(prop.initializer)) {\n mask |= parseInt(prop.initializer.text, 10)\n return\n }\n if (ts.isPrefixUnaryExpression(prop.initializer)) {\n // Handle negative literals like -1\n mask = 0xffffffff | 0\n return\n }\n }\n }\n // No __mask found — use driving accessor mask\n const driverProp = name === 'each' ? 'items' : name === 'branch' ? 'on' : 'when'\n for (const prop of opts.properties) {\n if (\n ts.isPropertyAssignment(prop) &&\n ts.isIdentifier(prop.name) &&\n prop.name.text === driverProp\n ) {\n if (\n ts.isArrowFunction(prop.initializer) ||\n ts.isFunctionExpression(prop.initializer)\n ) {\n const { mask: m } = computeAccessorMask(prop.initializer, fieldBits)\n mask |= m || 0xffffffff | 0\n }\n break\n }\n }\n }\n }\n }\n ts.forEachChild(node, walk)\n }\n\n walk(viewProp.initializer)\n return foundStructural ? mask || 0xffffffff | 0 : 0\n}\n\n/**\n * Build the `__prefixes` property assignment from path → bit maps.\n *\n * Emits one arrow `(s) => s.<path>` per distinct path. Array index =\n * the path's bit position: positions 0..30 come from `fieldBits` (low\n * word), positions 31..61 from `fieldBitsHi` (high word). The runtime\n * walks this array and reference-compares `prefix(prev)` vs\n * `prefix(next)` per entry, fanning bits into a `(lo, hi)` pair when\n * the array length exceeds 31.\n *\n * Returns null if no paths are present.\n */\nfunction buildPrefixesProp(\n fieldBits: Map<string, number>,\n fieldBitsHi: Map<string, number>,\n f: ts.NodeFactory,\n hasOpaqueAccessor: boolean = false,\n): ts.PropertyAssignment | null {\n if (fieldBits.size === 0 && fieldBitsHi.size === 0 && !hasOpaqueAccessor) return null\n // Sort paths by bit value within each word. Bits are powers of two\n // inside their word (1, 2, 4, …, 1<<30), so sorting numerically gives\n // ascending bit position. FULL_MASK (-1) entries from past-61\n // overflow shouldn't drive a prefix entry — defensively skip them.\n const orderedLo = [...fieldBits.entries()]\n .filter(([, bit]) => bit > 0)\n .sort(([, a], [, b]) => a - b)\n const orderedHi = [...fieldBitsHi.entries()].sort(([, a], [, b]) => a - b)\n const buildArrow = (parts: string[]): ts.ArrowFunction => {\n // Empty parts → `(s) => s` (whole-state sentinel). Any other path\n // builds the optional-chain access expression.\n const body = parts.length === 0 ? f.createIdentifier('s') : buildAccess(f, 's', parts)\n return f.createArrowFunction(\n undefined,\n undefined,\n [f.createParameterDeclaration(undefined, undefined, 's')],\n undefined,\n f.createToken(ts.SyntaxKind.EqualsGreaterThanToken),\n body,\n )\n }\n const arrows: ts.ArrowFunction[] = [\n ...orderedLo.map(([path]) => buildArrow(path.split('.'))),\n ...orderedHi.map(([path]) => buildArrow(path.split('.'))),\n ]\n // Append the whole-state sentinel `(s) => s` when any accessor in\n // the file flows state opaquely. Its prefix bit dirties on every\n // update (immutable reducers always return a new object identity),\n // so FULL_MASK bindings — whose mask covers every bit — fire even\n // when the changed field has no traceable prefix entry. Without\n // this, a field read ONLY through an opaque expression would\n // disappear from `__prefixes`; computeDirtyFromPrefixes would\n // return 0 for changes to it; (-1) & 0 = 0; the binding would\n // silently never re-evaluate.\n if (hasOpaqueAccessor) arrows.push(buildArrow([]))\n return f.createPropertyAssignment('__prefixes', f.createArrayLiteralExpression(arrows, false))\n}\n\nfunction buildAccess(f: ts.NodeFactory, root: string, parts: string[]): ts.Expression {\n let expr: ts.Expression = f.createIdentifier(root)\n for (const part of parts) {\n // Use optional chaining for nested paths\n if (parts.length > 1) {\n expr = f.createPropertyAccessChain(expr, f.createToken(ts.SyntaxKind.QuestionDotToken), part)\n } else {\n expr = f.createPropertyAccessExpression(expr, part)\n }\n }\n return expr\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opaque-state-flow.d.ts","sourceRoot":"","sources":["../../src/modules/opaque-state-flow.ts"],"names":[],"mappings":"AAwCA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAiIlD,wBAAgB,qBAAqB,IAAI,cAAc,CAyCtD"}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
// `opaque-state-flow` — errors when a reactive accessor's body flows
|
|
2
|
+
// the state identifier into an expression the walker can't statically
|
|
3
|
+
// trace. The compiler still produces a *correct* binding by forcing
|
|
4
|
+
// FULL_MASK and emitting a whole-state `(s) => s` sentinel into
|
|
5
|
+
// `__prefixes` (see `02 Compiler.md` § "Opaque-flow classifier"), but
|
|
6
|
+
// the binding then re-evaluates on every state change rather than
|
|
7
|
+
// only when its actual reads change. This rule surfaces the leak so
|
|
8
|
+
// authors can either:
|
|
9
|
+
//
|
|
10
|
+
// - Rewrite the accessor as direct property access (`s.foo`,
|
|
11
|
+
// `s.foo['literal']`), the form the walker can resolve.
|
|
12
|
+
// - Declare the reads explicitly via `track({ deps: (s) => [...] })`
|
|
13
|
+
// — the compile-time escape hatch the framework provides for cases
|
|
14
|
+
// where the read genuinely can't be expressed inline.
|
|
15
|
+
//
|
|
16
|
+
// Detected leak shapes (mirrors the classifier in
|
|
17
|
+
// `transform.ts:computeAccessorMask`):
|
|
18
|
+
// - `helper(s)` with an Identifier callee that can't be resolved to
|
|
19
|
+
// a local declaration (function parameter, import, destructured
|
|
20
|
+
// binding) — the callee may read any field of `s`.
|
|
21
|
+
//
|
|
22
|
+
// NOT flagged (intentional): `obj.helper(s)` / `lib.fn(s)` —
|
|
23
|
+
// PropertyAccessExpression callees. This is the documented headless-
|
|
24
|
+
// components idiom (`pr.valueText(s)` where `pr` comes from
|
|
25
|
+
// `progress.connect()`), and refactoring it defeats the API surface.
|
|
26
|
+
// The runtime sentinel keeps such bindings correct — the cost is a
|
|
27
|
+
// per-update re-evaluation, which is a property of the composition
|
|
28
|
+
// pattern rather than an author mistake worth blocking.
|
|
29
|
+
// - `new Wrapper(s)` — NewExpression with state as an argument.
|
|
30
|
+
// - `` tag`${s}` `` — TaggedTemplate with state in a span.
|
|
31
|
+
// - `{ ...s }` / `[...s]` — spread of state.
|
|
32
|
+
// - `const x = s` — const aliasing.
|
|
33
|
+
// - `cond ? s : other` — state in a conditional branch (state
|
|
34
|
+
// reaches the binding via a path the walker can't trace).
|
|
35
|
+
// - `s[expr]` — dynamic element access (literal keys are tracked).
|
|
36
|
+
// - State passed as `arg1+` to any call (the existing delegation
|
|
37
|
+
// branch only inspects `arg0`).
|
|
38
|
+
import ts from 'typescript';
|
|
39
|
+
import { rangeFromOffsets } from '../diagnostic.js';
|
|
40
|
+
import { isReactiveAccessor } from '../collect-deps.js';
|
|
41
|
+
import { resolveAccessorBody } from '../accessor-resolver.js';
|
|
42
|
+
// Mirrors the file-local list in collect-deps.ts. Calls to these
|
|
43
|
+
// framework primitives are visited as accessor positions in their
|
|
44
|
+
// own right, so we don't double-classify.
|
|
45
|
+
const NON_DELEGATION_HELPERS = new Set(['sample', 'item', 'memo', 'text', 'unsafeHtml']);
|
|
46
|
+
function findFirstLeakInAccessor(accessor) {
|
|
47
|
+
if (accessor.parameters.length !== 1)
|
|
48
|
+
return null;
|
|
49
|
+
const param = accessor.parameters[0];
|
|
50
|
+
if (!ts.isIdentifier(param.name))
|
|
51
|
+
return null;
|
|
52
|
+
if (!accessor.body)
|
|
53
|
+
return null;
|
|
54
|
+
const stateParam = param.name.text;
|
|
55
|
+
let leak = null;
|
|
56
|
+
const visit = (node) => {
|
|
57
|
+
if (leak)
|
|
58
|
+
return;
|
|
59
|
+
if (ts.isIdentifier(node) && node.text === stateParam) {
|
|
60
|
+
const parent = node.parent;
|
|
61
|
+
if (!parent || ts.isParameter(parent)) {
|
|
62
|
+
ts.forEachChild(node, visit);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
// Tracked containers — the same set the mask classifier honors.
|
|
66
|
+
let tracked = false;
|
|
67
|
+
let shape = '';
|
|
68
|
+
let hint = '';
|
|
69
|
+
if (ts.isPropertyAccessExpression(parent) && parent.expression === node) {
|
|
70
|
+
tracked = true;
|
|
71
|
+
}
|
|
72
|
+
else if (ts.isElementAccessExpression(parent) && parent.expression === node) {
|
|
73
|
+
if (ts.isStringLiteralLike(parent.argumentExpression) ||
|
|
74
|
+
ts.isNumericLiteral(parent.argumentExpression)) {
|
|
75
|
+
tracked = true;
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
shape = `dynamic element access \`s[<expr>]\``;
|
|
79
|
+
hint =
|
|
80
|
+
'replace the dynamic key with a literal property (e.g. `s.foo`), or declare the read via `track({ deps: (s) => [s[key]] })`.';
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
else if (ts.isCallExpression(parent) && parent.arguments[0] === node) {
|
|
84
|
+
if (ts.isIdentifier(parent.expression) &&
|
|
85
|
+
!NON_DELEGATION_HELPERS.has(parent.expression.text)) {
|
|
86
|
+
// Identifier-callee delegation. Recurse into the callee's
|
|
87
|
+
// body via the same resolver the mask walker uses. If it
|
|
88
|
+
// resolves to a local accessor, the helper's reads are
|
|
89
|
+
// walked transitively and the call is tracked. If the
|
|
90
|
+
// callee is a function parameter, import, destructured
|
|
91
|
+
// binding, or otherwise unresolvable, this IS the leak
|
|
92
|
+
// shape — flag it here so the diagnostic points at the
|
|
93
|
+
// call site rather than at some deeper unresolvable read.
|
|
94
|
+
const resolved = resolveAccessorBody(parent.expression);
|
|
95
|
+
if (resolved) {
|
|
96
|
+
tracked = true;
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
shape = `call to an unresolvable callee \`${parent.expression.text}(s)\` (function parameter, import, or destructured binding)`;
|
|
100
|
+
hint =
|
|
101
|
+
'inline the read against `s` directly, refactor the callee into a same-module `const`/`function` declaration, or declare the dependencies via `track({ deps: (s) => [...] })`.';
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
else if (!ts.isIdentifier(parent.expression)) {
|
|
105
|
+
// Method-call / computed callee with state arg —
|
|
106
|
+
// `obj.helper(s)`, `lib.fn(s)`. This is the documented
|
|
107
|
+
// headless-components idiom (`pr.valueText(s)` where `pr`
|
|
108
|
+
// comes from `progress.connect()`); refactoring it would
|
|
109
|
+
// defeat the API surface. The runtime sentinel keeps the
|
|
110
|
+
// binding correct — just at the cost of re-evaluating on
|
|
111
|
+
// every update. Treat as tracked from the lint's POV so
|
|
112
|
+
// legitimate composition doesn't error the build; the
|
|
113
|
+
// perf cost is a property of the composition pattern, not
|
|
114
|
+
// an author mistake worth blocking.
|
|
115
|
+
tracked = true;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
else if (ts.isNewExpression(parent)) {
|
|
119
|
+
shape = 'state passed as a constructor argument (`new X(s)`)';
|
|
120
|
+
hint =
|
|
121
|
+
'compute the derived value inline against direct state reads, or use `track({ deps: (s) => [...] })` to declare the reads.';
|
|
122
|
+
}
|
|
123
|
+
else if (ts.isSpreadElement(parent) || ts.isSpreadAssignment(parent)) {
|
|
124
|
+
shape = 'state spread (`{...s}` / `[...s]`)';
|
|
125
|
+
hint =
|
|
126
|
+
'spread only the fields you actually need (`{...s.user}`), or use `track({ deps: (s) => [...] })`.';
|
|
127
|
+
}
|
|
128
|
+
else if (ts.isVariableDeclaration(parent)) {
|
|
129
|
+
shape = 'const alias (`const x = s; … x.foo`)';
|
|
130
|
+
hint =
|
|
131
|
+
'inline the alias to `s.foo`, or split the deeper read into a separate single-assignment alias `const foo = s.foo`.';
|
|
132
|
+
}
|
|
133
|
+
else if (ts.isConditionalExpression(parent)) {
|
|
134
|
+
shape = 'state in a conditional branch (`cond ? s : other`)';
|
|
135
|
+
hint = 'move the conditional inside the property access: `cond ? s.foo : other.foo`.';
|
|
136
|
+
}
|
|
137
|
+
else if (ts.isAsExpression(parent) || ts.isTypeAssertionExpression(parent)) {
|
|
138
|
+
shape = 'type assertion wrapping state (`(s as T).foo`)';
|
|
139
|
+
hint = 'drop the assertion — the chain `s.foo` already carries the type.';
|
|
140
|
+
}
|
|
141
|
+
else if (ts.isParenthesizedExpression(parent)) {
|
|
142
|
+
// Walk up through parens transparently. Don't flag here; the
|
|
143
|
+
// outer parent classifies.
|
|
144
|
+
ts.forEachChild(node, visit);
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
shape = `state used outside a tracked container (${describe(parent)})`;
|
|
149
|
+
hint =
|
|
150
|
+
'restructure the expression so `s` appears only as the root of a property/element-access chain, or declare the read via `track({ deps: (s) => [...] })`.';
|
|
151
|
+
}
|
|
152
|
+
if (!tracked) {
|
|
153
|
+
leak = { node, shape, hint };
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
ts.forEachChild(node, visit);
|
|
158
|
+
};
|
|
159
|
+
visit(accessor.body);
|
|
160
|
+
return leak;
|
|
161
|
+
}
|
|
162
|
+
function describe(node) {
|
|
163
|
+
if (ts.isIdentifier(node))
|
|
164
|
+
return node.text;
|
|
165
|
+
if (ts.isPropertyAccessExpression(node))
|
|
166
|
+
return `${describe(node.expression)}.${node.name.text}`;
|
|
167
|
+
return ts.SyntaxKind[node.kind];
|
|
168
|
+
}
|
|
169
|
+
export function opaqueStateFlowModule() {
|
|
170
|
+
return {
|
|
171
|
+
name: 'opaque-state-flow',
|
|
172
|
+
compilerVersion: '^0.3.0',
|
|
173
|
+
diagnostics: [
|
|
174
|
+
{
|
|
175
|
+
id: 'llui/opaque-state-flow',
|
|
176
|
+
description: "Reactive accessor flows state into an opaque expression the walker can't trace. The runtime stays correct via a FULL_MASK binding + whole-state sentinel in `__prefixes`, but the binding then re-evaluates on every state change.",
|
|
177
|
+
},
|
|
178
|
+
],
|
|
179
|
+
visitors: {
|
|
180
|
+
[ts.SyntaxKind.SourceFile]: (ctx, node) => {
|
|
181
|
+
const visited = node;
|
|
182
|
+
const sf = ts.createSourceFile(visited.fileName, visited.text, ts.ScriptTarget.Latest, true);
|
|
183
|
+
const walk = (n) => {
|
|
184
|
+
if ((ts.isArrowFunction(n) || ts.isFunctionExpression(n)) && isReactiveAccessor(n)) {
|
|
185
|
+
const leak = findFirstLeakInAccessor(n);
|
|
186
|
+
if (leak) {
|
|
187
|
+
ctx.reportDiagnostic({
|
|
188
|
+
id: 'llui/opaque-state-flow',
|
|
189
|
+
severity: 'error',
|
|
190
|
+
category: 'perf',
|
|
191
|
+
message: `Reactive accessor flows state opaquely — ${leak.shape}. ` +
|
|
192
|
+
`The compiler ships a correct binding (FULL_MASK + whole-state sentinel), ` +
|
|
193
|
+
`but it re-evaluates on every state change. ${leak.hint}`,
|
|
194
|
+
location: {
|
|
195
|
+
file: sf.fileName,
|
|
196
|
+
range: rangeFromOffsets(sf.text, leak.node.getStart(sf), leak.node.getEnd()),
|
|
197
|
+
},
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
ts.forEachChild(n, walk);
|
|
202
|
+
};
|
|
203
|
+
walk(sf);
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
//# sourceMappingURL=opaque-state-flow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opaque-state-flow.js","sourceRoot":"","sources":["../../src/modules/opaque-state-flow.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sEAAsE;AACtE,oEAAoE;AACpE,gEAAgE;AAChE,sEAAsE;AACtE,kEAAkE;AAClE,oEAAoE;AACpE,sBAAsB;AACtB,EAAE;AACF,+DAA+D;AAC/D,4DAA4D;AAC5D,uEAAuE;AACvE,uEAAuE;AACvE,0DAA0D;AAC1D,EAAE;AACF,kDAAkD;AAClD,uCAAuC;AACvC,sEAAsE;AACtE,oEAAoE;AACpE,uDAAuD;AACvD,EAAE;AACF,6DAA6D;AAC7D,qEAAqE;AACrE,4DAA4D;AAC5D,qEAAqE;AACrE,mEAAmE;AACnE,mEAAmE;AACnE,wDAAwD;AACxD,kEAAkE;AAClE,6DAA6D;AAC7D,+CAA+C;AAC/C,sCAAsC;AACtC,gEAAgE;AAChE,8DAA8D;AAC9D,qEAAqE;AACrE,mEAAmE;AACnE,oCAAoC;AAEpC,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAEnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAE7D,iEAAiE;AACjE,kEAAkE;AAClE,0CAA0C;AAC1C,MAAM,sBAAsB,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC,CAAA;AAQxF,SAAS,uBAAuB,CAC9B,QAA2E;IAE3E,IAAI,QAAQ,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAA;IACjD,MAAM,KAAK,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAE,CAAA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,EACL,4CAA4C,IAAI,CAAC,KAAK,IAAI;oCAC1D,2EAA2E;oCAC3E,8CAA8C,IAAI,CAAC,IAAI,EAAE;gCAC3D,QAAQ,EAAE;oCACR,IAAI,EAAE,EAAE,CAAC,QAAQ;oCACjB,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;iCAC7E;6BACF,CAAC,CAAA;wBACJ,CAAC;oBACH,CAAC;oBACD,EAAE,CAAC,YAAY,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;gBAC1B,CAAC,CAAA;gBACD,IAAI,CAAC,EAAE,CAAC,CAAA;YACV,CAAC;SACF;KACF,CAAA;AACH,CAAC","sourcesContent":["// `opaque-state-flow` — errors when a reactive accessor's body flows\n// the state identifier into an expression the walker can't statically\n// trace. The compiler still produces a *correct* binding by forcing\n// FULL_MASK and emitting a whole-state `(s) => s` sentinel into\n// `__prefixes` (see `02 Compiler.md` § \"Opaque-flow classifier\"), but\n// the binding then re-evaluates on every state change rather than\n// only when its actual reads change. This rule surfaces the leak so\n// authors can either:\n//\n// - Rewrite the accessor as direct property access (`s.foo`,\n// `s.foo['literal']`), the form the walker can resolve.\n// - Declare the reads explicitly via `track({ deps: (s) => [...] })`\n// — the compile-time escape hatch the framework provides for cases\n// where the read genuinely can't be expressed inline.\n//\n// Detected leak shapes (mirrors the classifier in\n// `transform.ts:computeAccessorMask`):\n// - `helper(s)` with an Identifier callee that can't be resolved to\n// a local declaration (function parameter, import, destructured\n// binding) — the callee may read any field of `s`.\n//\n// NOT flagged (intentional): `obj.helper(s)` / `lib.fn(s)` —\n// PropertyAccessExpression callees. This is the documented headless-\n// components idiom (`pr.valueText(s)` where `pr` comes from\n// `progress.connect()`), and refactoring it defeats the API surface.\n// The runtime sentinel keeps such bindings correct — the cost is a\n// per-update re-evaluation, which is a property of the composition\n// pattern rather than an author mistake worth blocking.\n// - `new Wrapper(s)` — NewExpression with state as an argument.\n// - `` tag`${s}` `` — TaggedTemplate with state in a span.\n// - `{ ...s }` / `[...s]` — spread of state.\n// - `const x = s` — const aliasing.\n// - `cond ? s : other` — state in a conditional branch (state\n// reaches the binding via a path the walker can't trace).\n// - `s[expr]` — dynamic element access (literal keys are tracked).\n// - State passed as `arg1+` to any call (the existing delegation\n// branch only inspects `arg0`).\n\nimport ts from 'typescript'\nimport { rangeFromOffsets } from '../diagnostic.js'\nimport type { CompilerModule } from '../module.js'\nimport { isReactiveAccessor } from '../collect-deps.js'\nimport { resolveAccessorBody } from '../accessor-resolver.js'\n\n// Mirrors the file-local list in collect-deps.ts. Calls to these\n// framework primitives are visited as accessor positions in their\n// own right, so we don't double-classify.\nconst NON_DELEGATION_HELPERS = new Set(['sample', 'item', 'memo', 'text', 'unsafeHtml'])\n\ninterface LeakSite {\n node: ts.Node\n shape: string\n hint: string\n}\n\nfunction findFirstLeakInAccessor(\n accessor: ts.ArrowFunction | ts.FunctionExpression | ts.FunctionDeclaration,\n): LeakSite | null {\n if (accessor.parameters.length !== 1) return null\n const param = accessor.parameters[0]!\n if (!ts.isIdentifier(param.name)) return null\n if (!accessor.body) return null\n const stateParam = param.name.text\n\n let leak: LeakSite | null = null\n const visit = (node: ts.Node): void => {\n if (leak) return\n if (ts.isIdentifier(node) && node.text === stateParam) {\n const parent = node.parent\n if (!parent || ts.isParameter(parent)) {\n ts.forEachChild(node, visit)\n return\n }\n // Tracked containers — the same set the mask classifier honors.\n let tracked = false\n let shape = ''\n let hint = ''\n if (ts.isPropertyAccessExpression(parent) && parent.expression === node) {\n tracked = true\n } else if (ts.isElementAccessExpression(parent) && parent.expression === node) {\n if (\n ts.isStringLiteralLike(parent.argumentExpression) ||\n ts.isNumericLiteral(parent.argumentExpression)\n ) {\n tracked = true\n } else {\n shape = `dynamic element access \\`s[<expr>]\\``\n hint =\n 'replace the dynamic key with a literal property (e.g. `s.foo`), or declare the read via `track({ deps: (s) => [s[key]] })`.'\n }\n } else if (ts.isCallExpression(parent) && parent.arguments[0] === node) {\n if (\n ts.isIdentifier(parent.expression) &&\n !NON_DELEGATION_HELPERS.has(parent.expression.text)\n ) {\n // Identifier-callee delegation. Recurse into the callee's\n // body via the same resolver the mask walker uses. If it\n // resolves to a local accessor, the helper's reads are\n // walked transitively and the call is tracked. If the\n // callee is a function parameter, import, destructured\n // binding, or otherwise unresolvable, this IS the leak\n // shape — flag it here so the diagnostic points at the\n // call site rather than at some deeper unresolvable read.\n const resolved = resolveAccessorBody(parent.expression)\n if (resolved) {\n tracked = true\n } else {\n shape = `call to an unresolvable callee \\`${parent.expression.text}(s)\\` (function parameter, import, or destructured binding)`\n hint =\n 'inline the read against `s` directly, refactor the callee into a same-module `const`/`function` declaration, or declare the dependencies via `track({ deps: (s) => [...] })`.'\n }\n } else if (!ts.isIdentifier(parent.expression)) {\n // Method-call / computed callee with state arg —\n // `obj.helper(s)`, `lib.fn(s)`. This is the documented\n // headless-components idiom (`pr.valueText(s)` where `pr`\n // comes from `progress.connect()`); refactoring it would\n // defeat the API surface. The runtime sentinel keeps the\n // binding correct — just at the cost of re-evaluating on\n // every update. Treat as tracked from the lint's POV so\n // legitimate composition doesn't error the build; the\n // perf cost is a property of the composition pattern, not\n // an author mistake worth blocking.\n tracked = true\n }\n } else if (ts.isNewExpression(parent)) {\n shape = 'state passed as a constructor argument (`new X(s)`)'\n hint =\n 'compute the derived value inline against direct state reads, or use `track({ deps: (s) => [...] })` to declare the reads.'\n } else if (ts.isSpreadElement(parent) || ts.isSpreadAssignment(parent)) {\n shape = 'state spread (`{...s}` / `[...s]`)'\n hint =\n 'spread only the fields you actually need (`{...s.user}`), or use `track({ deps: (s) => [...] })`.'\n } else if (ts.isVariableDeclaration(parent)) {\n shape = 'const alias (`const x = s; … x.foo`)'\n hint =\n 'inline the alias to `s.foo`, or split the deeper read into a separate single-assignment alias `const foo = s.foo`.'\n } else if (ts.isConditionalExpression(parent)) {\n shape = 'state in a conditional branch (`cond ? s : other`)'\n hint = 'move the conditional inside the property access: `cond ? s.foo : other.foo`.'\n } else if (ts.isAsExpression(parent) || ts.isTypeAssertionExpression(parent)) {\n shape = 'type assertion wrapping state (`(s as T).foo`)'\n hint = 'drop the assertion — the chain `s.foo` already carries the type.'\n } else if (ts.isParenthesizedExpression(parent)) {\n // Walk up through parens transparently. Don't flag here; the\n // outer parent classifies.\n ts.forEachChild(node, visit)\n return\n } else {\n shape = `state used outside a tracked container (${describe(parent)})`\n hint =\n 'restructure the expression so `s` appears only as the root of a property/element-access chain, or declare the read via `track({ deps: (s) => [...] })`.'\n }\n if (!tracked) {\n leak = { node, shape, hint }\n return\n }\n }\n ts.forEachChild(node, visit)\n }\n visit(accessor.body)\n return leak\n}\n\nfunction describe(node: ts.Node): string {\n if (ts.isIdentifier(node)) return node.text\n if (ts.isPropertyAccessExpression(node)) return `${describe(node.expression)}.${node.name.text}`\n return ts.SyntaxKind[node.kind]\n}\n\nexport function opaqueStateFlowModule(): CompilerModule {\n return {\n name: 'opaque-state-flow',\n compilerVersion: '^0.3.0',\n diagnostics: [\n {\n id: 'llui/opaque-state-flow',\n description:\n \"Reactive accessor flows state into an opaque expression the walker can't trace. The runtime stays correct via a FULL_MASK binding + whole-state sentinel in `__prefixes`, but the binding then re-evaluates on every state change.\",\n },\n ],\n visitors: {\n [ts.SyntaxKind.SourceFile]: (ctx, node) => {\n const visited = node as ts.SourceFile\n const sf = ts.createSourceFile(visited.fileName, visited.text, ts.ScriptTarget.Latest, true)\n\n const walk = (n: ts.Node): void => {\n if ((ts.isArrowFunction(n) || ts.isFunctionExpression(n)) && isReactiveAccessor(n)) {\n const leak = findFirstLeakInAccessor(n)\n if (leak) {\n ctx.reportDiagnostic({\n id: 'llui/opaque-state-flow',\n severity: 'error',\n category: 'perf',\n message:\n `Reactive accessor flows state opaquely — ${leak.shape}. ` +\n `The compiler ships a correct binding (FULL_MASK + whole-state sentinel), ` +\n `but it re-evaluates on every state change. ${leak.hint}`,\n location: {\n file: sf.fileName,\n range: rangeFromOffsets(sf.text, leak.node.getStart(sf), leak.node.getEnd()),\n },\n })\n }\n }\n ts.forEachChild(n, walk)\n }\n walk(sf)\n },\n },\n }\n}\n"]}
|
package/dist/transform.d.ts
CHANGED
|
@@ -56,7 +56,7 @@ export interface PreExtractedSchemas {
|
|
|
56
56
|
stateSchema?: ReturnType<typeof extractStateSchema>;
|
|
57
57
|
effectSchema?: ReturnType<typeof extractEffectSchema>;
|
|
58
58
|
}
|
|
59
|
-
export declare function transformLlui(source: string, _filename: string, devMode?: boolean, emitAgentMetadata?: boolean, mcpPort?: number | null, verbose?: boolean, typeSources?: ExternalTypeSources, preExtracted?: PreExtractedSchemas, crossFilePaths?: ReadonlySet<string
|
|
59
|
+
export declare function transformLlui(source: string, _filename: string, devMode?: boolean, emitAgentMetadata?: boolean, mcpPort?: number | null, verbose?: boolean, typeSources?: ExternalTypeSources, preExtracted?: PreExtractedSchemas, crossFilePaths?: ReadonlySet<string>, crossFileOpaque?: boolean): {
|
|
60
60
|
output: string;
|
|
61
61
|
edits: TransformEdit[];
|
|
62
62
|
diagnostics: Diagnostic[];
|
package/dist/transform.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../src/transform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAA;AAG3B,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAOtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAiCjD,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,EAAE,CAAC,WAAW,EAAE,IAAI,EAAE,MAAM,GAAG,EAAE,CAAC,UAAU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