Skip to content

fixes #24720; std lib iterators unnecessarily require value copies#24723

Closed
ringabout wants to merge 9 commits into
develfrom
pr_tables_lent_iter
Closed

fixes #24720; std lib iterators unnecessarily require value copies#24723
ringabout wants to merge 9 commits into
develfrom
pr_tables_lent_iter

Conversation

@ringabout
Copy link
Copy Markdown
Member

@ringabout ringabout commented Feb 25, 2025

fixes #24720

It seems that Nim lacks something like derefs in Nimony. i.e. it cannot handle tuple types containing view types: e.g. (lent T, lent T). So I fix the types for forVars in sem phases to have the (T, T) type. And in transf for inline iterators, it derefs the internal field: i.e. let tmpAsgn = rhs; var lhs = (deref tmpAsgn[0], deref tmpAsgn[1])

@ringabout ringabout marked this pull request as draft May 26, 2025 11:37
@ringabout
Copy link
Copy Markdown
Member Author

succeeded by #25783

@ringabout ringabout closed this Apr 30, 2026
@ringabout ringabout deleted the pr_tables_lent_iter branch April 30, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

std lib iterators unnecessarily require value copies

1 participant