feat: connect source compilation and VM execution
Verify databases and deploy Aster VM / verify-and-deploy (push) Successful in 7m56s

This commit is contained in:
2026-10-19 14:50:37 +08:00
parent f5268d2e09
commit aa3257bfe6
45 changed files with 1501 additions and 44 deletions
+12
View File
@@ -0,0 +1,12 @@
# compiler
最小 Endor 编译器:frontend AST → 名称/作用域分析 → wordcode 模板 → VM 代码对象。依赖本地 frontend 和 core(Rust 库名 endor_core),不引入第三方依赖,不让 core 反向依赖 parser。运行时基础类和类型注解求值不是编译前提。
| 内容 | 职责 |
| --- | --- |
| [Cargo.toml](Cargo.toml) | compiler 包、本地 frontend/core 依赖与工作区 lint |
| [src](src/README.md) | 分析、字节码生成与显式代码对象装载 |
| [examples](examples/README.md) | 可供 cli run/eval 的 Endor 源码文件,也是远端集成测试输入 |
| [tests](tests/README.md) | 源码到 VM、错误路径、名称与对象生命周期检查 |
公开入口为 analyze、compile_ast、compile_source、CompileOptions 和 CompiledCode::load。完整规则与所有权见 [编译链路](../../docs/runtime/compiler.md);CLI 使用见 [运行指南](../../docs/operations/README.md)。修改语法仍进入 [frontend](../frontend/README.md),修改指令/验证进入 [objects](../objects/README.md),修改执行进入 [core](../core/README.md)。返回 [工作区](../README.md)。