rbartlensky / Lua-interpreter

A Lua interpreter in Rust
5 stars 2 forks source link

Function args #17

Closed rbartlensky closed 5 years ago

rbartlensky commented 5 years ago

This implements functions parameters and arguments. The compiler now emits push instructions in order to save the arguments on the stack. The VM clones the values from the stack into the registers which correspond to the parameters of the function when the new stack frame is constructed.