Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In the event that a for loop iterates over `Value`s and also referes to elements not defined by the for loop, `find_value_in_for_loop` would needlessly call `ForLoop::get_current_value` for each of those lookups. `ForLoop::get_current_value` can be expensive, potentially incurring a clone of a possibly large `Value`. This change moves the `get_current_value` so that we only clone a `Value` when needed. Co-authored-by: Harrison Kaiser <[email protected]>
- Loading branch information