Files
hakorune/tools/vm_stats_diff.sh
Moe Charm 3c3dc86be0 feat: MIR builder TypeOp lowering for is/as methods and isType/asType functions
- Add early TypeOp lowering in build_expression for method-style is()/as()
- Add early TypeOp lowering in build_expression for function-style isType()/asType()
- Add special handling in build_print_statement for print(isType/asType(...))
- Fix MIR optimizer borrow checker issues and remove obsolete BoxFieldLoad
- Extract string literal helper supports both direct literals and StringBox wrappers
- Note: isType call generation still has issues (undefined SSA value in print)

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-24 00:05:12 +09:00

28 lines
592 B
Bash

#!/usr/bin/env bash
set -euo pipefail
if [ $# -ne 2 ]; then
echo "Usage: $0 <stats_before.json> <stats_after.json>" >&2
exit 1
fi
A="$1"
B="$2"
if [ ! -f "$A" ] || [ ! -f "$B" ]; then
echo "Input files not found" >&2
exit 1
fi
# Extract counts objects and join keys
KEYS=$(jq -r '.counts | keys[]' "$A" "$B" | sort -u)
printf "%-14s %8s %8s %8s\n" "OP" "A" "B" "+/-"
for k in $KEYS; do
va=$(jq -r --arg k "$k" '.counts[$k] // 0' "$A")
vb=$(jq -r --arg k "$k" '.counts[$k] // 0' "$B")
d=$(( vb - va ))
printf "%-14s %8d %8d %8d\n" "$k" "$va" "$vb" "$d"
done | sort -k1,1