CozySynthesizer / cozy

The collection synthesizer
https://cozy.uwplse.org
Apache License 2.0
209 stars 18 forks source link

potential dead code? #86

Closed izgzhen closed 6 years ago

izgzhen commented 6 years ago

https://github.com/CozySynthesizer/cozy/blob/eb650f36dd16c5170a126761ba504c0072e454a4/cozy/evaluation.py#L597 this closure has an argument stk but not using it

Calvin-L commented 6 years ago

The inner set_arg function is appended to the list of operations to perform. Each operation must be a function that accepts a stack of values as input. Operations are allowed to manipulate the stack. This operation happens not to manipulate the stack, but if you remove the argument the code will crash because a stack will be passed by the caller.

Calvin-L commented 6 years ago

This might be clearer if we had type annotations in the evaluation module (see #50).