3.9 KiB
3.9 KiB
Phase 20.12 — Smokes / Benches
代表スモーク
- AOT:
aot_cli_emit_exe.sh(PASS) - AOT: dist/lib 既定探索(FFI)—
aot_c_api_ffi_dist_lib_default.sh(環境次第でPASS/未整備はSKIP) - VM : Runner 決定/採用(観測のみ)
- AOT: emit‑exe の MIR 保存(前処理後)—
emit_exe_mir_prep_fold_binop.sh- dev/quick 既定:
HAKO_AOT_PREP=1,HAKO_AOT_PREP_LANG=1(HAKO_SAVE_MIR=1推奨)
- dev/quick 既定:
- STRICT:
strict_print_const_exe.sh(print(1000) → PASS) - STRICT:
strict_print_loop_exe.sh(ループ最終値 1000 → PASS、PHIローカライズ適用) - STRICT:
strict_print_if_merge_exe.sh(if-merge 後値 1000 → PASS、PHI正道) - STRICT:
strict_print_loop_small_exe.sh(ループ内の連続 print: 1,2,3) - STRICT:
strict_print_diamond_exe.sh(ダイアモンド合流後に 1000 を print) - STRICT:
strict_print_if_same_value_exe.sh(then/else 同値→合流後 1000 を print) - STRICT:
strict_print_nested_if_exe.sh(ネスト if で 1000→ print) - STRICT:
strict_print_elseif_chain_exe.sh(else-if チェーンで 1000 を print) - STRICT:
strict_print_three_way_exe.sh(三択分岐の合流で 1000 を print)
Using Resolver(Runner ゲート)
using_resolver_apply_gate_vm.sh(HAKO_USING_RESOLVER_APPLY=1 時に短文 [using-resolver] apply: を観測。ビルドによっては SKIP)using_resolver_missing_ok_vm.sh(存在しないモジュール名 → modules_error 短文を観測)using_resolver_private_strict_fail_vm.sh(パスUsing×private strict。ビルドによっては path‑using が strict をバイパス → SKIP)using_resolver_ambiguous_vm.sh(using_paths 上で同名モジュールが複数候補 → ambiguous 短文、実行は継続)
JSON v0 Unify(観測・ゲートON)
json_v0_unify_suite_vm.sh(SMOKES_ENABLE_JSON_V0_UNIFY=1 で代表群を実行。PASS/一部SKIP容認、bring‑up 状態を観測)
マイクロベンチ(計画)
- EXE(C 基準)
- loop_sum: 1e7 加算ループ
- call_chain: 小関数チェーンの反復
- array_walk: 連続アクセス(stride=1)
- VM(Python 基準)
- loop_sum_vm, call_chain_vm, array_walk_vm
観測・判定
- EXE: C 比 ≥ 0.6×(ファイル出力/STDOUT一致の確認つき)
- VM : Python と ±20%(JSON形式で中央値出力→比較)
Loop parity (new)
tools/smokes/v2/profiles/integration/parity/loop_side_effect_vm_llvm.sh- Purpose: ensure VM/LLVM parity for a minimal side-effect loop (prints 0..2)
- Gate: harness-first; NYASH_ENABLE_LOOPFORM=1 by default for this smoke (parity-safe)
tools/smokes/v2/profiles/integration/parity/loop_continue_vm_llvm.sh- Purpose: VM/LLVM parity for
continuein small loop (prints 0,2) - Gate: harness-first; LoopForm gate optional
- Purpose: VM/LLVM parity for
tools/smokes/v2/profiles/integration/parity/loop_break_vm_llvm.sh- Purpose: VM/LLVM parity for
breakin small loop (prints 0,1) - Gate: harness-first; LoopForm gate optional
- Purpose: VM/LLVM parity for
IR-level checks (new)
tools/smokes/v2/profiles/quick/rust-aot/llvm_ir_bench_externs_void_i64.sh- Purpose: Ensure bench externs are declared/called as
void(i64)(hako_console_log_i64,hako_bench_noop_i64,hako_bench_use_value_i64). - Method: grep optimized IR for declare/call signatures; harness-only.
- Purpose: Ensure bench externs are declared/called as
tools/smokes/v2/profiles/quick/rust-aot/llvm_ir_tail_musttail_placement.sh- Purpose: Tail-call hint (
tail call) is emitted when in true tail position and strict gate is ON. - Gate:
NYASH_LLVM_TAILCALL=1 NYASH_LLVM_TAILCALL_STRICT=1(harness-only)
- Purpose: Tail-call hint (
tools/smokes/v2/profiles/quick/rust-aot/llvm_ir_no_unused_method_name_global.sh- Purpose: Unused method results prefer by-id path (no
@unified_method_*globals materialized). - Gate:
NYASH_LLVM_METHOD_BY_ID=1(harness-only)
- Purpose: Unused method results prefer by-id path (no
tools/smokes/v2/profiles/quick/rust-aot/llvm_ir_constructor_new_i64x_unknown_box.sh- Purpose: Unknown user box constructor lowers to
nyash.env.box.new_i64x.
- Purpose: Unknown user box constructor lowers to