-
Notifications
You must be signed in to change notification settings - Fork 0
Enable to handle some promoted constants #12
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
Conversation
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.
Pull request overview
This PR refactors constant handling to support promoted constants by moving the logic from Env::operand_type() to the Analyzer struct in basic_block.rs. The implementation is decomposed into three helper methods for better maintainability and adds support for handling unevaluated constants.
- Moves constant handling from
env.rstobasic_block.rsfor better access to type context - Adds support for promoted constants via
const_eval_resolve - Introduces
PlaceType::immut()method for creating immutable pointer types
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/refine/env.rs | Removes operand_type method, unused imports, and adds new immut() helper method |
| src/analyze/basic_block.rs | Implements three new methods (const_bytes_ty, const_value_ty, const_ty) for handling constants and refactors operand_type to use them |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9ec096e to
762cfab
Compare
for #10