Q+ 文档

Windows AOT spike3(探索,1.7.0-dev / v4.38)

English summary. Exploratory Windows AOT spike3: 5/5 selected non-trivial AOT fixtures embedded in a PE run under wine with byte-identical stdout/rc; estimate 4–6/6–9 weeks MEDIUM-HIGH. There is no Windows AOT implementation and no Windows platform-usability claim; PE emitter/bootstrap/general runtime/SEH remain missing; 1.5 defers the full workstream; older estimates are historical.

Windows AOT 仍未实现、不声称 Windows 平台可用。本页记录 spike3 的探索结果与当前估算。

spike3 结果(探索性)

在第 2 个 spike(PE 内嵌 Q+ AOT 机器码 + VEH syscall trap runtime)基础上,把同一工具链用于 5 个非平凡 AOT-supported fixtures:VM 期望输出 → AOT ELF → 嵌入 PE(R+X @0x400000; 0F 05 syscall → CC 90;BSS 为 no-file .bss;rodata 可选 VirtualAlloc)→ mingw 链接 PE + VEH runtime → wine 运行 → stdout/rc 逐字节比较。

fixture类别patched syscall 点PE 大小结果
abstractions/p11_gstruct_ok.qstructs/generic204109,147 BPASS
bounds/p08_array_elem_ok.qarrays/loops230112,989 BPASS
u64/p08_strings.qstrings697329,819 BPASS
aot_float/p01_float_print.qfloat formatting232125,525 BPASS
aot_u64/p08_aot_i64_boxed.qint64 boxed236126,549 BPASS

5 PASS / 0 FAIL(全部 rc=0、stdout 一致、无 “unsupported syscall” trap)。这是选中子集 的证据,不是通用 Windows AOT 声明:fixtures 来自 tools/test.sh 的 aot_pair(已 AOT 支持)且 syscall 较轻(主要 write/exit);allocator/file/thread/args、SEH、真实 Windows 均未覆盖。

估算演进(当前 = 4–6 / 6–9 周,MEDIUM-HIGH)

阶段估算状态
1.4.4 可行性9–15 周 HIGHhistorical(被后续取代)
spike1/27–10 / 10–14 周 MEDIUM-HIGH → 5–8 / 8–11 周historical
spike3(当前)4–6 周乐观 / 6–9 周悲观,MEDIUM-HIGH当前估计

关键路径已从“基础 trap runtime”转为 Q+ 内 PE emitter + 三阶段自举固定点,随后是通用 runtime(allocator/args/file)。1.5 建议暂缓完整 Windows AOT workstream;若 Maintainer 排优先级, 仅做 bounded 4–6 周 static-console 子集 POC;不得作为 1.5 主线交付、不得称平台可用。

仍未完成(gap)

相关文档:docs/WIN32_AOT_SPIKE3.md(当前)、WIN32_AOT_SPIKE2.md、WIN32_AOT_SPIKE.md、 WIN32_AOT_FEASIBILITY.md(均历史/探索记录);spec §11.8。发布候选 NOT PUBLISHED。

← Q+ Hub