diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2025-04-06 18:49:11 +0200 |
---|---|---|
committer | P-E-P <32375388+P-E-P@users.noreply.github.com> | 2025-04-24 16:53:44 +0000 |
commit | 7acf75a3af9b367a3afdc8d465f1e34b6fb83e19 (patch) | |
tree | 6b87b09e7c9709f5cebee171540c5f106c3beefc /gcc/rust/resolve/rust-late-name-resolver-2.0.h | |
parent | 5d6320ceb3b00a7ea6b988ec55c772f563dfd675 (diff) | |
download | gcc-7acf75a3af9b367a3afdc8d465f1e34b6fb83e19.zip gcc-7acf75a3af9b367a3afdc8d465f1e34b6fb83e19.tar.gz gcc-7acf75a3af9b367a3afdc8d465f1e34b6fb83e19.tar.bz2 |
Use stacked context for nested bindings.
Binding context may be stacked when a new binding group is introduced
within a const expression.
gcc/rust/ChangeLog:
* resolve/rust-name-resolution-context.h: Use BindingLayer instead.
* resolve/rust-name-resolution-context.cc (BindingLayer::BindingLayer):
Add new constructor for binding layer.
(BindingLayer::bind_test): Add a function to test a binding constraint.
(BindingLayer::push): Push a new binding group.
(BindingLayer::and_binded): Add function to test and-binding
constraint.
(BindingLayer::or_binded): Add function to test or-binding constraints.
(BindingLayer::insert_ident): Insert a new identifier in the current
binding group.
(BindingLayer::merge): Merge current binding group with it's parent.
(BindingLayer::get_source): Get the source of the current binding
group.
* resolve/rust-late-name-resolver-2.0.cc: Use stacked context for
binding group.
* util/rust-stacked-contexts.h: Add mutable peek function.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc/rust/resolve/rust-late-name-resolver-2.0.h')
0 files changed, 0 insertions, 0 deletions