Skip to content

L1 (#58): target: 'lynx' compiler backend — create functions, slot tables, dual-graph emission #60

Open

Description

@Huxpro

Follow-up to #58, gated on the L0 GO verdict recorded in docs/lynx-specialized-target-l0.md (PR #59). L0 measured the representation win with a hand-written fixture cell; L1 makes the compiler emit it.

Scope (spec sections in parentheses):

  • renderers.js: accept target: 'lynx' with a config version bump; compile-lynx.js shares the front-end via compileInternal (hook slots, dep inference, HMR, profiling, source maps unchanged).
  • Codegen per template: straight-line PAPI create functions (§3.2), compiler-assigned slot tables (§3.3), template registry with compile-time-stable ids; static/dynamic split at compile time.
  • Dual-graph emission through the existing rspeedy layer mechanism with per-layer erasure parity (background callbacks/effects erased from main; statically-named host props constraint preserved).
  • Directive lowering deferred from L0's fixture scope: @if/@switch as BRANCH arm templates, @try/@pending/@catch boundary ranges, @for/@empty keyed ranges (§3.4).
  • Source maps and HMR identity across the new backend.

Exit gate (from #58): the existing .lynx.tsrx corpus and compiler test suite compile under the new target; emitted-program size ≤ the current plan encoding for the same fixtures.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-authoredenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions