Files
hakorune/local_tests/simple_perf_test.sh
Moe Charm 3df87fb1ce fix(phase-4.3c-3): Fix StringBox literal handling in MIR builder
Phase 4-3c-3 Complete: WASM host functions now correctly output string content

## Changes:
- Fixed MIR builder to handle StringBox with string literal arguments
- Special case for  to generate proper string constants
- Removed debug output after successful verification
- WASM now correctly outputs "Hello MIR!" instead of "StringBox"

## Test Results:
- MIR generation:  Generates  correctly
- WASM compilation:  String data correctly placed at offset 4096
- WASM execution:  Outputs "Hello MIR\!" as expected

## Technical Details:
- Modified build_new_expression() to detect StringBox with literal arguments
- Generates Const instruction with actual string content
- Host function reads StringBox memory layout correctly

This completes the WASM string output functionality for Phase 4.

🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-17 13:49:35 +09:00

30 lines
940 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# シンプルなパフォーマンス測定
echo "🔬 FileBox パフォーマンス測定100回のファイル操作"
echo "=================================================="
# クリーンアップ
rm -f perf_test_*.txt
# 動的版
echo -e "\n📊 動的版 (現在のビルド)"
echo "計測開始..."
time RUST_LOG=error ./target/release/nyash local_tests/benchmark_filebox_simple.nyash > /dev/null 2>&1
rm -f perf_test_*.txt
# 静的版ビルド
echo -e "\n🔧 静的版をビルド中..."
cargo build --release --no-default-features -j32 > /dev/null 2>&1
# 静的版
echo -e "\n📊 静的版 (dynamic-file無効)"
echo "計測開始..."
time RUST_LOG=error ./target/release/nyash local_tests/benchmark_filebox_simple.nyash > /dev/null 2>&1
rm -f perf_test_*.txt
# 動的版に戻す
echo -e "\n🔧 動的版に戻します..."
cargo build --release -j32 > /dev/null 2>&1
echo -e "\n✅ 測定完了!"