Files
hakorune/apps/tests
nyash-codex cd12a2569e feat(llvm): Phase 87 - LLVM exe line SSOT + integration smoke
Established single pipeline for .hako → executable generation.

SSOT: tools/build_llvm.sh
- Standard procedure: build_llvm.sh input.hako -o output_exe
- Prerequisites: llvm-config-18, llvmlite, LLVM features enabled
- Pipeline: .hako → MIR → LLVM IR → .o → executable

New files:
- docs: phase87-selfhost-llvm-exe-line.md (SSOT procedure doc)
  * Full troubleshooting guide (llvm-config, llvmlite, linking)
  * Advanced usage (custom output, debugging, performance notes)
  * Anti-patterns documentation (no duplication/fragmentation)
- fixture: apps/tests/phase87_llvm_exe_min.hako (5 lines, return 42)
- smoke: integration/apps/phase87_llvm_exe_min.sh
  * Exit code verification (stdout-independent testing)
  * SKIP if LLVM unavailable (graceful degradation)
  * Integration profile only (not in quick)
- index: 10-Now.md, 01-JoinIR-Selfhost-INDEX.md (Phase 87 entries)
- task: CURRENT_TASK.md (Phase 74-87 status update)

Integration smoke: demonstrates full pipeline
- Build: .hako → .o → exe (successful )
- Runtime: Ring0 initialization issue (known limitation, out of scope)
Quick profile: unchanged (integration only, per policy)
Policy: No duplicate build paths, SSOT maintained

987/987 tests PASS (production stable)
2025-12-13 22:51:13 +09:00
..

Nyash Test Programs

このディレクトリには、CI/CDやデバッグ用のテストプログラムが含まれています。 実用的なアプリケーションは親ディレクトリ(apps/)にあります。

テストプログラム一覧

LLVMバックエンドテスト

  • ny-llvm-smoke/ - ArrayBox基本操作テスト
  • ny-array-llvm-ret/ - ArrayBox戻り値テスト
  • ny-echo-lite/ - 最小echo実装I/Oテスト
  • ny-map-llvm-smoke/ - MapBoxプラグインテスト
  • ny-vinvoke-smoke/ - 可変長引数5引数テスト
  • ny-vinvoke-llvm-ret/ - 可変長引数戻り値テスト
  • ny-vinvoke-llvm-ret-size/ - 固定長引数size())テスト

実行方法

これらのテストは主に tools/llvm_smoke.sh から実行されます:

# 環境変数でテストを有効化
NYASH_LLVM_MAP_SMOKE=1 ./tools/llvm_smoke.sh
NYASH_LLVM_VINVOKE_RET_SMOKE=1 ./tools/llvm_smoke.sh

注意事項

  • これらは最小限の機能テストであり、実用的なアプリケーションではありません
  • CIでの自動テストを前提に設計されています
  • エラー時の切り分けが容易になるよう、各テストは単一の機能に焦点を当てています