]> gcc.gnu.org Git - gcc.git/commit
Add closure binding's tracking to name resolution
authorPhilip Herron <philip.herron@embecosm.com>
Fri, 21 Oct 2022 12:40:40 +0000 (13:40 +0100)
committerPhilip Herron <philip.herron@embecosm.com>
Sun, 4 Dec 2022 21:00:45 +0000 (21:00 +0000)
commitb5c354de73ddccb7738778c1e013d42b96aeb048
tree606e6aa1cd1ba5f6dbee7a54dc6df92cfc8d20b8
parent6c5dc8aa1a99bc3a0220aeabecd84ffa6f233433
Add closure binding's tracking to name resolution

When we have a closure block referencing variables in a parent function,
we must track what these are. We do this by having a context of closures
so if we have a variable reference and its declared in a rib whose node id
is less than the node id of the closure's node id we know it must be a
captured variable. We also need to iterate all possible closure contexts
as we might be in the case of a nested closure.

Addresses #195
gcc/rust/resolve/rust-ast-resolve-expr.cc
gcc/rust/resolve/rust-name-resolver.cc
gcc/rust/resolve/rust-name-resolver.h
This page took 0.061138 seconds and 6 git commands to generate.