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
gccrs const folding: port over cp_walk_subtrees() #1286
Conversation
Agreed. I think this change is really big, and I don't mind it being merged, but I fear it might be hard to work with. I think an approach that would be better for you and people reviewing PRs is adding changes incrementally, bringing over everything you need to make them work in the meantime. Of course, @philberty will have the last word as he has a better understanding of your project :)
I think you're right
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR has given me alot to think about after a conversation with @dafaust I think the fact your ported over LAMBDA_EXPR is pretty interesting.
I hope you don''t mind letting me look at this for another day. My gut feeling is that we need to remove the stuff for traitsand cp binding levels and namespaces also templates oh and thunk functions.
Leave this PR as is for another day and I will finish the review I just want to think about a few things here since the LAMBDA_EXPR will be really useful for us but I want to know how tied up is that gimplification code with the tsubst stuff for templates.
I agree, I think porting things one-by-one as we have use for them may be better. Skimming through the additions to rust-tree.h there are a lot of macros, struct members, bitfield elements etc. that I'm not sure will be relevant to rust, and I think going back to find and remove them later will be more trouble. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @abbasfaisal apologies for the delay in response here, I really like how you were able to port a lot of this over. But I think as a rule of thumb we should ignore any code that requires you to port over the extra TREE_CODE's from the CPP front-end it would also include things like the bool is_auto function or CLASS_TEMPLATE etc.
We want to port over the walk tree code because this is part of the code to replace param_decls with the arguments from last I remember walking the constexpr code.
So for this I would expect you can just this branch and just start by removing the is_auto function for example and keep going until you didn't include any extra new TREE_CODEs
Signed-off-by: Faisal Abbas <90.abbasfaisal@gmail.com>
@philberty As discussed offline:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a good start. It will make more sense once you start adding the proper entrypoint and see code evaluated by this function. I think it's good to merge this for now, and it will probably receive some changes soon. Good job :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice I think this looks good :)
Just one thing @abbasfaisal maybe you can update the original comment a bit to reflect the current changes, just because bors stuffs that message into the git log; I think some of the bullets are no longer relevant (for this specific merge at least) and might be a little confusing in the log.
Done :) |
bors r+ |
Build succeeded: |
Card: Link
Most of TREE_CODEs in the original function belonged to cp/cp-tree.def which have been removed so this ported function is a lot smaller.