-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get rid of lambda within HIR::TupleStruct #707
Labels
Comments
dafaust
added a commit
to dafaust/gccrs
that referenced
this issue
Oct 7, 2021
dafaust
added a commit
to dafaust/gccrs
that referenced
this issue
Oct 7, 2021
dkm
pushed a commit
to dkm/gccrs
that referenced
this issue
Oct 8, 2021
This patch removes the lambda iterators used in various HIR objects. These iterators make interacting with the IR for static analysis more difficult. Instead, get_X () helpers are added for accessing elements, and uses of the iterators replaced with for loops. The following objects are adjusted in this patch: - HIR::TupleExpr - HIR::StructExprField - HIR::StructStruct - HIR::TupleStruct Fixes: Rust-GCC#703, Rust-GCC#704, Rust-GCC#705, Rust-GCC#706, Rust-GCC#707
dafaust
added a commit
to dafaust/gccrs
that referenced
this issue
Oct 11, 2021
This patch removes the lambda iterators used in various HIR objects. These iterators make interacting with the IR for static analysis more difficult. Instead, get_X () helpers are added for accessing elements, and uses of the iterators replaced with for loops. The following objects are adjusted in this patch: - HIR::ArrayElemsValues - HIR::TupleExpr - HIR::StructExprField - HIR::StructStruct - HIR::TupleStruct Fixes: Rust-GCC#703, Rust-GCC#704, Rust-GCC#705, Rust-GCC#706, Rust-GCC#707
dafaust
added a commit
to dafaust/gccrs
that referenced
this issue
Oct 11, 2021
This patch removes the lambda iterators used in various HIR objects. These iterators make interacting with the IR for static analysis more difficult. Instead, get_X () helpers are added for accessing elements, and uses of the iterators replaced with for loops. The following objects are adjusted in this patch: - HIR::ArrayElemsValues - HIR::TupleExpr - HIR::StructExprField - HIR::StructStruct - HIR::TupleStruct Fixes: Rust-GCC#703, Rust-GCC#704, Rust-GCC#705, Rust-GCC#706, Rust-GCC#707
bors bot
added a commit
that referenced
this issue
Oct 13, 2021
710: Ensure for Coercion Sites we emit the code nessecary r=philberty a=philberty Coercion sites in Rust can require extra code generation for CallExpressions arguments for example. This ensures we detect those cases and emit the extra code necessary. Please read the individual commit messages for more detail on how this works. Fixes #700 #708 #709 727: Remove lambda iterators in various HIR classes r=philberty a=dafaust (This is a revision of #726 with formatting fixes) This patch removes the lambda iterators used in various HIR objects. These iterators make interacting with the IR for static analysis more difficult. Instead, get_X () helpers are added for accessing elements, and uses of the iterators replaced with for loops. The following objects are adjusted in this patch: - HIR::ArrayElemsValues - HIR::TupleExpr - HIR::StructExprField - HIR::StructStruct - HIR::TupleStruct Fixes: #703 Fixes: #704 Fixes: #705 Fixes: #706 Fixes: #707 Co-authored-by: Philip Herron <philip.herron@embecosm.com> Co-authored-by: David Faust <david.faust@oracle.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
gccrs/gcc/rust/hir/tree/rust-hir-item.h
Lines 1613 to 1620 in 99c2830
Lambda's like this need to be removed they make working with the IR's more complex for static analysis. To fix this issue you should be able to remove this lambda helper function and provide a method to return a reference to the values like
Create a new helper to access the elements:
The text was updated successfully, but these errors were encountered: