Conversation
Fixed 8 operations that were missing virtual register spills: ┌─────────────────────────────────┬──────────────────────┐ │ Operation │ Type │ ├─────────────────────────────────┼──────────────────────┤ │ and │ Boolean │ ├─────────────────────────────────┼──────────────────────┤ │ or │ Boolean │ ├─────────────────────────────────┼──────────────────────┤ │ not │ Boolean │ ├─────────────────────────────────┼──────────────────────┤ │ tuck │ Stack │ ├─────────────────────────────────┼──────────────────────┤ │ 2dup │ Stack │ ├─────────────────────────────────┼──────────────────────┤ │ nip │ Stack (runtime call) │ ├─────────────────────────────────┼──────────────────────┤ │ f.+, f.-, f.*, f./ │ Float arithmetic │ ├─────────────────────────────────┼──────────────────────┤ │ f.=, f.<>, f.<, f.>, f.<=, f.>= │ Float comparison │ └─────────────────────────────────┴──────────────────────┘ Added 22 new integration tests in tests/integration/src/test-virtual-register-spill.seq that specifically test integer literals followed by each operation. These tests would have caught the bug - they verify that 3 4 2dup produces 3 4 3 4 (not 0 0 3 4). All 199 tests pass (177 original + 22 new).
PR Review - Virtual Register Spill FixSummaryThis PR fixes a critical code generation bug where 8 operations were missing virtual register spills before accessing memory. The fix correctly adds Code Quality - ✅ ExcellentStrengths:
Code Organization:
Test Coverage - ✅ ExcellentThe new test file Test Categories:
Test Quality:
Total: 22 new tests, all passing (177 + 22 = 199 tests) Potential Issues -
|
Fixed 8 operations that were missing virtual register spills:
┌─────────────────────────────────┬──────────────────────┐
│ Operation │ Type │
├─────────────────────────────────┼──────────────────────┤
│ and │ Boolean │
├─────────────────────────────────┼──────────────────────┤
│ or │ Boolean │
├─────────────────────────────────┼──────────────────────┤
│ not │ Boolean │
├─────────────────────────────────┼──────────────────────┤
│ tuck │ Stack │
├─────────────────────────────────┼──────────────────────┤
│ 2dup │ Stack │
├─────────────────────────────────┼──────────────────────┤
│ nip │ Stack (runtime call) │
├─────────────────────────────────┼──────────────────────┤
│ f.+, f.-, f.*, f./ │ Float arithmetic │
├─────────────────────────────────┼──────────────────────┤
│ f.=, f.<>, f.<, f.>, f.<=, f.>= │ Float comparison │
└─────────────────────────────────┴──────────────────────┘
Added 22 new integration tests in tests/integration/src/test-virtual-register-spill.seq that specifically test integer literals followed by each operation. These tests would have caught the bug - they verify that 3 4 2dup produces 3 4 3 4 (not 0 0 3 4).
All 199 tests pass (177 original + 22 new).