This commit is contained in:
Nilton Constantino
2026-02-02 19:57:04 +00:00
parent b6912c4369
commit b4deaa243e
19 changed files with 66 additions and 136 deletions
-77
View File
@@ -1,80 +1,3 @@
## PR-15 — Link Orchestration v0 inside `prometeu_compiler`
**Why:** The compiler must emit a single closed-world executable blob.
### Scope
* Move all link responsibilities to `prometeu_compiler`:
* **Input:** `Vec<CompiledModule>` (in build-plan order)
* **Output:** `ProgramImage` (single PBS v0 bytecode blob)
* Linker responsibilities (v0):
* resolve imports to exports across modules
* validate symbol visibility (`pub` only)
* assign final `FunctionTable` indices
* patch `CALL` opcodes to final `func_id`
* merge constant pools deterministically
* emit final PBS v0 image
### Deliverables
* `link(modules) -> Result<ProgramImage, LinkError>`
* `LinkError` variants:
* unresolved import
* duplicate export
* incompatible symbol signature (if available)
### Tests
* `archive-pbs/test01` as integration test:
* root depends on a lib
* root calls into lib
* final blob runs successfully in VM
### Acceptance
* Compiler emits a single executable blob; VM performs no linking.
---
## PR-16 — VM Boundary Cleanup: remove linker behavior from runtime
**Why:** Runtime must be dumb and deterministic.
### Scope
* Audit `prometeu_core` and `prometeu_bytecode`:
* VM loads PBS v0 module
* VM verifies (optional) and executes
* Remove or disable any linker-like behavior in runtime:
* no dependency resolution
* no symbol lookup by name
* no module graph assumptions
### Deliverables
* VM init path uses:
* `BytecodeLoader::load()` → `(code, const_pool, functions)`
* verifier as an execution gate
### Tests
* runtime loads and executes compiler-produced blob
### Acceptance
* Linking is fully compiler-owned.
---
## PR-17 — Diagnostics UX: dependency graph and resolution trace
**Why:** Dependency failures must be explainable.