Emitter for ProductCaseClassRepresentation.ProdDataList and the wider Data-shape product family (ProdDataConstr, PackedDataList, PairIntDataList) — they all share the unConstrData/headList/tailList extraction pattern and converge on ProdDataList for Match.
Owns:
genConstr (Data-list-shaped Constr emission).
genSelect (field projection through ProdDataList).
genMatch (single-constructor extraction; multi-case input is shrunk via selectMatchCase, then handed to DataConstrEmitter.genMatchDataConstrCase for the actual binding + body lowering).
Constructor-handling helpers (retrieveConstrDecl, retrieveConstrIndex, selectMatchCase) still live on ProductCaseEmitter during the Phase 4c migration — they're shared with ProdBuiltinPairOps and several Sum-side typegens.
Data-list-shaped Constr emission: convert each arg to its data form, fold into a mkCons chain, wrap as a ProdDataList-tagged value carrying constr.tp as the SIR type.
Data-list-shaped Constr emission: convert each arg to its data form, fold into a mkCons chain, wrap as a ProdDataList-tagged value carrying constr.tp as the SIR type.
Match emission on a Data-shape product scrutinee. For >1-case input the applicable case is selected via ProductCaseEmitter.selectMatchCase and the rest are statically dropped (info-logged). Single-case input flows directly to DataConstrEmitter.genMatchDataConstrCase, which owns the actual field-extraction + body-lowering inside the Data list scope.
Match emission on a Data-shape product scrutinee. For >1-case input the applicable case is selected via ProductCaseEmitter.selectMatchCase and the rest are statically dropped (info-logged). Single-case input flows directly to DataConstrEmitter.genMatchDataConstrCase, which owns the actual field-extraction + body-lowering inside the Data list scope.
Field projection on a Data-shape product: convert the scrutinee to ProdDataList, then walk to the chosen field via dropList (V4+, fieldIdx ≥ 2) or chained tailList (V1-V3 / fieldIdx < 2), and read with headList.
Field projection on a Data-shape product: convert the scrutinee to ProdDataList, then walk to the chosen field via dropList (V4+, fieldIdx ≥ 2) or chained tailList (V1-V3 / fieldIdx < 2), and read with headList.