-
Notifications
You must be signed in to change notification settings - Fork 13
Get arithmetic operation kind for compound assignments #388
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.
Thanks @d367wang !
*/ | ||
ArithmeticVariableSlot createArithmeticVariableSlot( | ||
AnnotationLocation location, AnnotatedTypeMirror lhsAtm, AnnotatedTypeMirror rhsAtm); | ||
AnnotationLocation location, TypeMirror lhs, TypeMirror rhs); |
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.
The names/comments in the javadoc above also need to be updated.
@Override | ||
public ArithmeticVariableSlot createArithmeticVariableSlot( | ||
AnnotationLocation location, AnnotatedTypeMirror lhsAtm, AnnotatedTypeMirror rhsAtm) { | ||
AnnotationLocation location, TypeMirror lhs, TypeMirror rhs) { |
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.
Why are there no calls to this method that need to be changed?
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.
Because ArithmeticVariableSlot
s are only created in the value-inference downstream
* Determine the type kind of an arithmetic operation, based on Binary Numeric Promotion in JLS 5.6.2. | ||
* @param lhsAtm atm of left operand | ||
* @param rhsAtm atm of right operand | ||
* @param lhsType type of left operand |
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.
Could you break this PR into two, one for compound assignments and one for these parameter type changes?
Co-authored-by: Werner Dietl <[email protected]>
…inference into value-patch-1
@d367wang Thanks! Is there a follow-up PR for the |
A split of #331
SlotManager.createArithmeticVariableSlot
Co-authored-by: Jenny Xiang [email protected]