rust-hosted-langs / book

Writing Interpreters in Rust: a Guide
https://rust-hosted-langs.github.io/book/
Creative Commons Attribution 4.0 International
479 stars 27 forks source link

Close up to 3 upvalues in one opcode #26

Open pliniker opened 4 years ago

pliniker commented 4 years ago

The CloseUpvalues opcode can take three operands, i.e. up to three upvalues can be closed in one operation. The present implementation lazily only does one.

See TODO: interpreter/src/compiler.rs:247

Refactor the loop to add up to three upvalues per CloseUpvalues opcode.