feat(phase90): Ring0Context fs/time/thread migration complete
Phase 90 完了: IO/fs/time/thread 系の Ring0 移行 **Phase 90-A: fs 系移行(7箇所)** - FsApi trait 追加(6メソッド) - StdFs 実装(std::fs ベース) - IoError 拡張(4バリアント追加) - 移行: strip.rs(4), dispatch.rs(1), mod.rs(3) **Phase 90-B: io 系移行** - Phase 88 完了済み(スキップ) **Phase 90-C: time 系移行(3箇所)** - TimeApi に elapsed() 追加 - 移行: selfhost_exe.rs(1), io.rs(1), plugin_loader_unified.rs(1) **Phase 90-D: thread 系移行(2箇所)** - ThreadApi trait 追加(sleep メソッド) - StdThread 実装 - 移行: global_hooks.rs(1), plugin_loader_unified.rs(1) **Phase 90-E: 統合テスト** - ビルド成功(6 warnings, 0 errors) - テスト: 522/554 passed (94.2%) - 退行なし **実装成果**: - Ring0Context 拡張: fs, thread フィールド追加 - 総移行: 12箇所(fs: 7, time: 3, thread: 2) - 移行率: fs(2.9%), time(2.1%), thread(5.4%) **次のステップ**: Phase 91 (PluginHost/CoreServices skeleton) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -357,7 +357,64 @@ Phase 89 以降で段階的に移行予定。
|
||||
|
||||
---
|
||||
|
||||
## 5. 今後の棚卸しタスク(Phase 91 以降)
|
||||
## 5. Phase 90 移行実績(2025-12-03)
|
||||
|
||||
### Phase 90-A: fs 系移行(7箇所)
|
||||
|
||||
**FsApi trait 追加**:
|
||||
- `read_to_string()`, `read()`, `write_all()`, `exists()`, `metadata()`, `canonicalize()`
|
||||
|
||||
**移行済みパス**:
|
||||
|
||||
| ファイル | 行 | 移行内容 |
|
||||
|---------|---|---------|
|
||||
| `src/runner/modes/common_util/resolve/strip.rs` | 550-555 | `std::fs::read_to_string` → `ring0.fs.read_to_string` |
|
||||
| `src/runner/modes/common_util/resolve/strip.rs` | 650-655 | `std::fs::read_to_string` → `ring0.fs.read_to_string` |
|
||||
| `src/runner/modes/common_util/resolve/strip.rs` | 901-906 | `std::fs::read_to_string` → `ring0.fs.read_to_string` |
|
||||
| `src/runner/modes/common_util/resolve/strip.rs` | 941-946 | `std::fs::read_to_string` → `ring0.fs.read_to_string` |
|
||||
| `src/runner/dispatch.rs` | 31-33 | `std::fs::read_to_string` → `ring0.fs.read_to_string` |
|
||||
| `src/runner/mod.rs` | 122-124 | `std::fs::read_to_string` → `ring0.fs.read_to_string` |
|
||||
| `src/runner/mod.rs` | 181-183 | `std::fs::read_to_string` → `ring0.fs.read_to_string` |
|
||||
| `src/runner/mod.rs` | 288-290 | `std::fs::read_to_string` → `ring0.fs.read_to_string` |
|
||||
|
||||
**移行進捗**: 7/243箇所 (2.9%)
|
||||
|
||||
### Phase 90-B: io 系移行
|
||||
|
||||
Phase 88 で既に IoApi 実装済みのため、スキップ(stdin/stdout は既存の ring0.io.* を使用)。
|
||||
|
||||
### Phase 90-C: time 系移行(3箇所)
|
||||
|
||||
**TimeApi に elapsed() 追加**:
|
||||
- `fn elapsed(&self, start: Instant) -> Duration`
|
||||
|
||||
**移行済みパス**:
|
||||
|
||||
| ファイル | 行 | 移行内容 |
|
||||
|---------|---|---------|
|
||||
| `src/runner/modes/common_util/selfhost_exe.rs` | 60-68 | `Instant::now() + elapsed()` → `ring0.time.monotonic_now() + ring0.time.elapsed()` |
|
||||
| `src/runner/modes/common_util/io.rs` | 22-37 | `Instant::now() + elapsed()` → `ring0.time.monotonic_now() + ring0.time.elapsed()` |
|
||||
| `src/runtime/plugin_loader_unified.rs` | 330-344 | `Instant::now() + elapsed()` → `ring0.time.monotonic_now() + ring0.time.elapsed()` |
|
||||
|
||||
**移行進捗**: 3/143箇所 (2.1%)
|
||||
|
||||
### Phase 90-D: thread 系移行(2箇所)
|
||||
|
||||
**ThreadApi trait 追加**:
|
||||
- `fn sleep(&self, duration: Duration)`
|
||||
|
||||
**移行済みパス**:
|
||||
|
||||
| ファイル | 行 | 移行内容 |
|
||||
|---------|---|---------|
|
||||
| `src/runtime/global_hooks.rs` | 246-253 | `std::thread::sleep` → `ring0.thread.sleep` |
|
||||
| `src/runtime/plugin_loader_unified.rs` | 342 | `std::thread::sleep` → `ring0.thread.sleep` |
|
||||
|
||||
**移行進捗**: 2/37箇所 (5.4%)
|
||||
|
||||
---
|
||||
|
||||
## 6. 今後の棚卸しタスク(Phase 91 以降)
|
||||
|
||||
- hakmem / nyrt 経由の低レベル API 呼び出し(alloc/free など)を一覧化。
|
||||
- 代表パス(selfhost/hack_check/VM/LLVM)のみを対象にした「最小 Ring0 呼び出しセット」を定義する。
|
||||
|
||||
Reference in New Issue
Block a user