Skip to content

Preserve locations across classic CLVM evaluation - #557

Draft
prozacchiwawa wants to merge 3 commits into
20260805-classic-codegenfrom
cursor/classic-run-program-cache-77ae
Draft

prozacchiwawa wants to merge 3 commits into
20260805-classic-codegenfrom
cursor/classic-run-program-cache-77ae

Conversation

@prozacchiwawa

@prozacchiwawa prozacchiwawa commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a ClassicAllocator::run_program wrapper around TRunProgram
  • cache raw CLVM input locations by tree hash for each execution and restore locations on matching result subtrees without changing their CLVM values
  • clear the execution cache after both successful and failed runs
  • route classic codegen compilation, macro, optimization, include, and symbol evaluation through the wrapper
  • cover matching-location restoration and cache lifetime with a focused unit test

Testing

  • cargo check
  • cargo test run_program_restores_matching_locations_and_clears_its_cache
  • cargo test test_equivalence_mandelbrot_classic
  • cargo test test_classic_codegen_recursive_source_locations
  • cargo test test_classic_codegen_function_call_with_rest_tail
  • cargo test -- --skip compile_performance_suite (706 passed; 0 failed; 1 ignored)
Open in Web Open in Cursor 

cursoragent and others added 3 commits August 11, 2026 03:36
Co-authored-by: arty <prozacchiwawa@users.noreply.github.com>
Co-authored-by: arty <prozacchiwawa@users.noreply.github.com>
Co-authored-by: arty <prozacchiwawa@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants