[Codex] Advance Dart/Zig C++ emitter host generation - #7
Closed
yasufumi-nakata wants to merge 5 commits into
Closed
Conversation
# Conflicts: # docs/ja/plans/p2-top100-language-coverage.md # docs/ja/todo/dart.md # docs/ja/todo/lua.md # docs/ja/todo/php.md # docs/ja/todo/powershell.md # docs/ja/todo/ruby.md # docs/ja/todo/zig.md # src/pytra-cli.py # tools/unittest/tooling/test_pytra_cli2.py
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
Dart / Zig で C++ emitter host 生成を次の段階まで進めました。
P1-HOST-CPP-EMITTER-DART-S1とP1-HOST-CPP-EMITTER-ZIG-S1は Docker 隔離環境で exact command が通る状態にし、S2 は import 配置の不整合を越えた先のコンパイル・実行ブロッカーまで確認しています。変更内容
TupleUnpack/MultiAssignを既存 tuple assignment renderer へ接続しました。run_emit_cliに module-id path 出力を追加し、Dart / Zig host 出力をstd/json.*やtoolchain/emit/common/cli_runner.*のような import path と一致する配置にしました。emit_contextに module ごとのroot_rel_prefixと_cli_all_module_idsを注入し、階層化された出力でも runtime / linked user module import を解決できるようにしました。import_bindingsから linked user module / nested import の symbol alias を補完するようにしました。pytra.std.jsonmodule import を補完し、Zig 出力には rootmain.zigshim を追加して nested entry module をビルドしやすくしました。pathlib.Pathへ戻し、runtime tree と Zig root shim を安定して出力するようにしました。verify-toolchain.shでも確認対象にしました。docs/ja/todo/dart.md/docs/ja/todo/zig.mdに S1 完了と S2 の現在地を追記しました。検証
PYTHONPATH=src python3 -m unittest tools.unittest.toolchain2.test_common_cli_runner tools.unittest.toolchain2.test_dart_emitter_smoke tools.unittest.toolchain2.test_zig_emitter_smokeRan 10 tests ... OK.devcontainer/scripts/verify-toolchain.sh: Dart / Zig を含め PASSpython3 src/pytra-cli.py -build src/toolchain/emit/cpp/cli.py --target dart -o work/selfhost/host-cpp/dart/PASS(30 modules link / 25 files)python3 src/pytra-cli.py -build src/toolchain/emit/cpp/cli.py --target zig -o work/selfhost/host-cpp/zig/PASS(30 modules link / 30 files + root shim)S2 の残ブロッカー
dart runは import 不整合を越え、次はextern()/field()/dict/sorted()/__file__/ Dart Map のitems()・get_()など Python runtime helper 未接続で停止します。zig build-exe work/selfhost/host-cpp/zig/main.zigは import 不整合を越え、次はfield()/dict/anytype型式 /__file__/_変数名 / shadowing・unused const など Zig emitter の未実装生成で停止します。.parity-results/emitter_host_dart.json/.parity-results/emitter_host_zig.jsonは PASS 結果としてはまだ更新していません。