implements PR021
This commit is contained in:
@@ -29,3 +29,4 @@ Cada documento e auto contido e inclui: `Briefing`, `Target`, `Method`, `Accepta
|
||||
20. `PR-018-pbs-result-flow-ok-err-handle-rules.md`
|
||||
21. `PR-019-pbs-non-unit-fallthrough-diagnostics.md`
|
||||
22. `PR-020-pbs-lowering-admission-gates.md`
|
||||
23. `PR-021-pbs-handle-aware-fallthrough-completion.md`
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
# PR-020 - PBS Lowering Admission Gates
|
||||
|
||||
## Briefing
|
||||
|
||||
Lowering currently proceeds even when syntax/static/linking diagnostics contain errors. This PR introduces explicit admission gates so invalid programs are rejected before IR lowering.
|
||||
|
||||
## Motivation
|
||||
|
||||
Lowering must not convert required rejections into accepted lowered artifacts.
|
||||
|
||||
## Target
|
||||
|
||||
- `PbsFrontendCompiler` and `PBSFrontendPhaseService` lowering flow.
|
||||
- Frontend-to-IR admission policy.
|
||||
|
||||
## Scope
|
||||
|
||||
- Block IR emission for source units with fatal diagnostics.
|
||||
- Preserve deterministic diagnostics already emitted by previous phases.
|
||||
- Keep successful paths unchanged.
|
||||
|
||||
## Method
|
||||
|
||||
- Introduce phase gate checks before `lowerFunctions` / file merge.
|
||||
- Ensure failed units are excluded from emitted IR.
|
||||
- Keep build issue adaptation behavior stable.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- Files/modules with syntax/static/linking errors are not lowered.
|
||||
- No invalid callable appears in IR output after failed admission.
|
||||
- Valid files continue lowering unchanged.
|
||||
|
||||
## Tests
|
||||
|
||||
- Add tests proving failed parse/semantic/linking input does not emit IR functions.
|
||||
- Add tests proving clean input still emits expected IR.
|
||||
- Run frontend phase service and compiler suites.
|
||||
|
||||
## Non-Goals
|
||||
|
||||
- Redefining diagnostics severity policy.
|
||||
- Introducing partial lowering recovery strategy.
|
||||
Reference in New Issue
Block a user