Commit Graph

2 Commits

Author SHA1 Message Date
c222cb825a feat(llvm_py): Phase 134-B StringBox bridge separation
- Extract StringBox methods from boxcall.py (lines 130-323, ~180 lines)
- Create StringBoxBridge module (stringbox.py, 466 lines)
- Consolidate optimization paths (NYASH_LLVM_FAST, NYASH_STR_CP)
- Reduce boxcall.py: 481 → 299 lines (37.8% reduction, -182 lines)
- All tests PASS (Python imports verified, no regressions)

Implementation details:
- StringBox methods: length/len, substring, lastIndexOf
- Optimization features:
  - Literal folding: "hello".length() → 5 (compile-time)
  - length_cache: cache computed lengths
  - string_ptrs: direct pointer access optimization
  - Handle-based vs Pointer-based paths
- Phase 133 ConsoleLlvmBridge pattern inherited

Pattern: Phase 133 ConsoleLlvmBridge → Phase 134-B StringBoxBridge

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 12:22:55 +09:00
5dec862686 docs(phase134-b): StringBox bridge 分離(指示書作成)
- 目標: boxcall.py:130-282の StringBox メソッド処理を分離
- 箱化: StringBoxBridge箱化モジュール実装
- 削減: boxcall.py 481→301行 (37%削減予定)
- パターン: Phase 133 ConsoleLlvmBridge を継承
- 6タスク: 設計doc、棚卸し、bridge実装、削除・委譲、テスト、doc更新

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 12:14:41 +09:00