You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(codegen): DEPYLER-1168/1169 Call-Site Clone + Index Assignment
DEPYLER-1168: Call-Site Borrowing Heuristic
- Fixes E0382 "use of moved value" when variable passed to ownership-taking
function is used again later in the same scope
- Added vars_used_later tracking to CodeGenContext
- Populate during statement iteration in func_gen.rs
- Insert .clone() at call site when variable is reused
- Hero example: normalize_data(dataset.clone()) preserves dataset
DEPYLER-1169: List Index Assignment
- Fixed list[i] = x generating vec.insert(i, x) instead of vec[i] = x
- insert() adds NEW element (shifts others), causing infinite growth
- Changed to proper index operator assignment
- Fixes bubble sort hang in data_analysis_combined
Verification:
- data_analysis_combined.py compiles and runs to completion
- Output: Mean, StdDev, Percentiles, Monte Carlo simulation
- Compile rate: 40.6% (130/320 files)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
0 commit comments