nim-works / phy

compiler and vm experiments
MIT License
3 stars 2 forks source link

pass4: fix locals not being processed #37

Closed zerbina closed 2 months ago

zerbina commented 2 months ago

Summary

Fix a bug with pass4 where references to locals within a Continue's expression were not patched, leading to code generation failures or incorrect behaviour at run-time.

Details

Instead of the expression's index, the node index of the continuation ID was passed to lowerExpr. A test is added to make sure the lowering works properly now.


Notes For Reviewers