82 lines
2.3 KiB
Markdown
82 lines
2.3 KiB
Markdown
# PR-09.1 - IRBackend Contract Cut: Remove `moduleKey` and `calleeModuleKey` (String)
|
|
|
|
## Briefing
|
|
|
|
O contrato executavel ainda carrega `moduleKey` textual como trilha de compatibilidade.
|
|
Isso mantem dupla identidade (`ModuleId` + string) em area critica de handoff.
|
|
|
|
## Motivation
|
|
|
|
### Dor atual que esta PR resolve
|
|
|
|
1. Identidade estrutural ainda pode cair em fallback textual.
|
|
2. Contrato permite dados redundantes e potencialmente divergentes.
|
|
3. A transicao para dense-only ainda nao esta fechada.
|
|
|
|
## Target
|
|
|
|
Encerrar a transicao no contrato FE->BE:
|
|
|
|
1. remover `moduleKey` de `IRBackendExecutableFunction`,
|
|
2. remover `calleeModuleKey` de instrucoes executaveis,
|
|
3. remover `moduleKey` de `CallableSignatureRef`,
|
|
4. eliminar parsing/fallback textual em `IRBackendAggregator`.
|
|
|
|
## Dependencies
|
|
|
|
Prerequisitos diretos:
|
|
|
|
1. `PR-08.2`
|
|
2. `PR-08.3`
|
|
3. `PR-08.4`
|
|
|
|
## Scope
|
|
|
|
1. Atualizar modelos em `prometeu-frontend-api` e `prometeu-compiler-core`.
|
|
2. Remover construtores de compatibilidade que aceitam `moduleKey` string.
|
|
3. Atualizar agregacao para reindexar apenas por `ModuleId` + `modulePool`.
|
|
4. Atualizar todos os testes afetados.
|
|
|
|
## Non-Goals
|
|
|
|
1. Nao alterar formato PBX nesta PR.
|
|
2. Nao mudar semantica de host/intrinsic callsites.
|
|
|
|
## Method
|
|
|
|
### O que deve ser feito explicitamente
|
|
|
|
1. Em `IRBackendExecutableFunction`:
|
|
- remover campo `moduleKey`,
|
|
- remover `calleeModuleKey`,
|
|
- manter apenas `ModuleId` estrutural.
|
|
2. Em `CallableSignatureRef`:
|
|
- remover `moduleKey`,
|
|
- manter `moduleId` + assinatura.
|
|
3. Em `IRBackend` agregador:
|
|
- remover `moduleReferenceFromKey(...)` e qualquer fallback textual.
|
|
4. Em testes:
|
|
- converter fixtures para `ModuleId` + `modulePool`.
|
|
|
|
## Acceptance Criteria
|
|
|
|
1. Nao existe mais `moduleKey` string em contratos estruturais FE/BE.
|
|
2. Reindexacao multi-file usa somente dense tables.
|
|
3. Build/test passam sem camadas de compatibilidade textual.
|
|
|
|
## Tests
|
|
|
|
1. `:prometeu-compiler:prometeu-compiler-core:test`
|
|
2. `:prometeu-compiler:prometeu-frontend-api:test`
|
|
3. `:prometeu-compiler:prometeu-build-pipeline:test`
|
|
|
|
## Affected Documents
|
|
|
|
1. `docs/pbs/specs/13. Lowering IRBackend Specification.md`
|
|
2. `docs/general/specs/20. IRBackend to IRVM Lowering Specification.md`
|
|
3. `docs/general/specs/22. Backend Spec-to-Test Conformance Matrix.md`
|
|
|
|
## Open Questions
|
|
|
|
1. Nenhuma. Esta PR fecha corte de transicao.
|