转向直接移植LinuxCNC源程序

结论:明确禁止继续扩展自写 CNC 主体语义,最小 runtime 仅保留为迁移探针;新增 interp_convert.cc 源码直连编译探针,并以最小 emcStatus 状态边界 shim 暴露 native runtime 阻塞点。检查:git diff --check 通过;wasm-port/tests/native/verify_native_probes.sh 通过,linuxcnc_interp_convert_source_probe exitcode=0。
This commit is contained in:
cnc
2026-06-06 23:13:44 +08:00
parent 15b04e8758
commit fb8d8b2d9d
7 changed files with 93 additions and 12 deletions

View File

@@ -371,7 +371,18 @@ Current verified progress:
`interp_convert.cc::convert_straight()` and
`rs274ngc_return.hh::NCE_CANNOT_DO_G1_WITH_ZERO_FEED_RATE`.
- This proves the current extracted interpreter slice can parse and execute a
simple traverse and feed move through a standalone canonical event sink.
small fixture set through a standalone canonical event sink.
- Important direction change: the minimal wrapper behavior is a migration
probe, not the program body. Do not expand it into a separate CNC
implementation. The next work must retire hand-written wrapper semantics and
move execution through vendored LinuxCNC interpreter source such as
`interp_convert.cc`, `interp_read.cc`, `interp_check.cc`, and
`interp_execute.cc`.
- `tools/build_native_probes.sh` now includes
`linuxcnc_interp_convert_source_probe`, which directly compiles vendored
`interp_convert.cc`. The required `emcStatus` shim is limited to the native
status boundary used by `tag_arc()` for machine units; it is not a
project-authored CNC behavior implementation.
## Phase 4: Port INI Parsing Without Editing Upstream
@@ -670,9 +681,11 @@ Keep these documents under `wasm-port/docs/`:
Continue expanding the standalone interpreter core from the verified minimal
traverse path:
1. replace the temporary minimal `convert_g()` implementation with thin
wrappers around more vendored interpreter conversion code,
2. add `_x`/`_y`/`_z` named parameter fixture coverage and align it with
`#5420`/`#5421`/`#5422`,
3. keep all source changes inside `wasm-port/` and leave `../linuxcnc/`
1. replace the temporary minimal `convert_g()` implementation with calls into
vendored LinuxCNC interpreter conversion code.
2. identify and shim the native runtime symbols blocking direct compilation of
`interp_convert.cc`, `interp_execute.cc`, and related interpreter files.
3. keep fixture coverage as regression protection while deleting temporary
hand-written semantics.
4. keep all source changes inside `wasm-port/` and leave `../linuxcnc/`
read-only.