Files
hakorune/apps/tests
Selfhosting Dev 1fd37bf14a refactor(llvm): Complete modularization of codegen.rs by Codex
- Split 2522-line codegen.rs into modular structure:
  - mod.rs (1330 lines) - main compilation flow and instruction dispatch
  - instructions.rs (1266 lines) - all MIR instruction implementations
  - types.rs (189 lines) - type conversion and classification helpers
  - helpers.rs retained for shared utilities

- Preserved all functionality including:
  - Plugin return value handling (BoxCall/ExternCall)
  - Handle-to-pointer conversions for proper value display
  - Type-aware return value processing based on MIR metadata
  - All optimization paths (ArrayBox fast-paths, string concat, etc.)

- Benefits:
  - Better code organization and maintainability
  - Easier to locate specific functionality
  - Reduced cognitive load when working on specific features
  - Cleaner separation of concerns

No functional changes - pure refactoring to improve code structure.
2025-09-11 17:51:43 +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での自動テストを前提に設計されています
  • エラー時の切り分けが容易になるよう、各テストは単一の機能に焦点を当てています