Files
hakorune/docs/development/current/CURRENT_TASK.md
Moe Charm 91f2ee11d6 Phase 10.1 リファクタリング: JIT lowerモジュールの分割
- core_hostcall.rs: HostCall関連のlowering処理を分離(array_get/array_set/box_call)
- 1000行制限を守るための構造整理(機能差分なし)
- ChatGPT5によるAI協調開発対応のリファクタリング

変更内容:
- src/jit/lower/core_hostcall.rs を新規追加
- src/jit/lower/mod.rs にモジュール追加
- ビルドとスモークテスト確認済み
2025-08-29 02:47:55 +09:00

79 lines
3.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 🎯 CURRENT TASK - 2025-08-29Phase 10.1 キックオフ+リファクタ)
Phase 10.10 は完了DoD確認済。Phase 10.1 に入る前に、JIT Lower 周辺の分割リファクタを小刻みに完了させ、スモークを維持したまま移行します。
## ⏱️ 今日のサマリ
- 目的: 10.1 着手前のリファクタ機能差分なしを完了し、Week1を開始する。
- スコープ: `src/jit/lower/core.rs / builder.rs` の整理のみ。挙動変更なし、ビルドとスモークは常にGreenを維持。
## 現在地Done / Doing / Next
- ✅ DonePhase 10.10
- GC Switchable RuntimeGcConfigBox/ Unified DebugDebugConfigBox
- JitPolicyBoxallowlist/presets/ HostCallのRO運用events連携
- CIスモーク導入runtime/compile-events/ 代表サンプル整備
- 🔧 DoingRefactor before 10.1
- `extern_thunks.rs` 抽出済builder → `src/jit/lower/extern_thunks.rs`
- `cfg_dot.rs` 抽出済core → `src/jit/lower/cfg_dot.rs`
- ⏭️ NextPhase 10.1 Kickoff
- Week1開始Python統合の環境・入り口整備
- 10.10の回帰はCIスモークで継続監視
## リファクタリング計画(機能差分なし)
1) core_hostcall 分割イベントloweremit_host_call周辺
- 追加: `src/jit/lower/core_hostcall.rs`
- `mod.rs`/`core.rs` のモジュール参照を更新
- 確認: `cargo check``bash tools/smoke_phase_10_10.sh`
2) core_ops 分割(算術/比較/分岐)
- 追加: `src/jit/lower/core_ops.rs`
- CLIF配線やb1正規化カウンタは移動のみ
- 確認: `cargo check` → 代表JITデモ2本を手動確認
3) 仕上げ
- 1ファイル ~1000行以内目安を満たすこと
- ドキュメント差分は最小本CURRENT_TASKのみ更新
### DoDRefactor
- `cargo check` が成功し、`tools/smoke_phase_10_10.sh` がGreen
- ログ/イベント出力がリファクタ前と一致(体感差分なし)
- `core.rs`/`builder.rs` の行数削減(目安 < 1000
## Phase 10.1 キックオフ
- 参照: `docs/development/roadmap/phases/phase-10.1/`
- Week1概要
- 10.1a: 計画再確認I/O境界GIL/FFI方針
- 10.1b: 環境設定最小ブリッジ検証手順
- 10.1c: パーサー統合の入口作成Box-Firstで薄く
- 10.1d: Core最小経路Phase 1機能
## すぐ試せるコマンド(現状維持の確認)
```bash
# BuildCranelift込み推奨
cargo build --release -j32 --features cranelift-jit
# Smoke10.10の代表確認)
bash tools/smoke_phase_10_10.sh
# HostCallHH直実行・read-only方針
NYASH_JIT_EXEC=1 NYASH_JIT_THRESHOLD=1 NYASH_JIT_HOSTCALL=1 NYASH_JIT_EVENTS=1 \
./target/release/nyash --backend vm examples/jit_map_get_param_hh.nyash
NYASH_JIT_THRESHOLD=1 NYASH_JIT_HOSTCALL=1 \
./target/release/nyash --backend vm examples/jit_policy_whitelist_demo.nyash
# GC countingVMパス
./target/release/nyash --backend vm examples/gc_counting_demo.nyash
# compileイベントのみ必要時
NYASH_JIT_EVENTS_COMPILE=1 NYASH_JIT_HOSTCALL=1 NYASH_JIT_EVENTS_PATH=events.jsonl \
./target/release/nyash --backend vm examples/jit_map_get_param_hh.nyash
```
## 参考リンク
- Phase 10.1: `docs/development/roadmap/phases/phase-10.1/README.md`
- Phase 10.10: `docs/development/roadmap/phases/phase-10/phase_10_10/README.md`
- MIR命令セット: `docs/reference/mir/INSTRUCTION_SET.md`
## Checkpoint再起動用メモ
- 状態確認: `git status` / `git log --oneline -3` / `cargo check`
- スモーク: `bash tools/smoke_phase_10_10.sh`
- 次の一手: core_hostcall core_ops の順に分割毎回ビルド/スモークで確認