-
Notifications
You must be signed in to change notification settings - Fork 738
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
Clean up ConstantPoolClassSlotIterator class #20492
Conversation
@@ -47,11 +47,11 @@ GC_ConstantPoolClassSlotIterator::nextSlot() | |||
_cpDescriptionIndex = J9_CP_DESCRIPTIONS_PER_U32; | |||
} | |||
|
|||
U_32 slotType = _cpDescription & J9_CP_DESCRIPTION_MASK; | |||
slotType = _cpDescription & J9_CP_DESCRIPTION_MASK; |
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.
missed declaration
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.
there is also U_8 need to be replaced with uint8_t
_cpEntryCount(clazz->romClass->ramConstantPoolCount) | ||
GC_ConstantPoolClassSlotIterator(J9Class *clazz) | ||
: _cpEntry((J9Object **)J9_CP_FROM_CLASS(clazz)) | ||
, _cpEntryCount(clazz->romClass->ramConstantPoolCount) |
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.
we should preserve indentation
_cpEntryCount(clazz->romClass->ramConstantPoolCount) | ||
GC_ConstantPoolClassSlotIterator(J9Class *clazz) | ||
: _cpEntry((J9Object **)J9_CP_FROM_CLASS(clazz)) | ||
, _cpEntryCount(clazz->romClass->ramConstantPoolCount) | ||
{ | ||
_cpEntryTotal = _cpEntryCount; | ||
if(_cpEntryCount) { |
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.
missing space in 'if('
c147b07
to
4939f34
Compare
_cpDescriptionIndex = 0; | ||
} | ||
|
||
}; |
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 we don't typically have semicolon after constructor
4939f34
to
e5005a7
Compare
jenkins compile win jdk11 |
c1c5ec7
to
a67e489
Compare
@dmitripivkine could you please relaunch jenkins compile win jdk11? there was mistake for removing wrong semicolon. Thanks |
jenkins compile win jdk11 |
{ | ||
_cpEntryTotal = _cpEntryCount; | ||
if(_cpEntryCount) { | ||
_cpDescriptionSlots = SRP_PTR_GET(&clazz->romClass->cpShapeDescription, U_32 *); | ||
if (_cpEntryCount) { |
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.
_cpEntryCount is an int, should we do 0 != .... ? @dmitripivkine
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.
yes, agreed
J9Object **slotPtr = _cpEntry; | ||
|
||
/* Adjust the CP slot and description information */ | ||
_cpEntry = (J9Object **)( ((U_8 *)_cpEntry) + sizeof(J9RAMConstantPoolItem) ); | ||
_cpEntry = (J9Object **)( ((uint8_t *)_cpEntry) + sizeof(J9RAMConstantPoolItem)); |
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.
please remove space in the cast:
(J9Object **)( ((uint8_t *) -> (J9Object **)(((uint8_t *)
a30f553
to
04e35a2
Compare
jenkins compile win jdk11 |
hm, seems like you lost some of the chagnes. all old INT types are back |
Use consistent data types and code formatting Signed-off-by: lhu <linhu@ca.ibm.com>
04e35a2
to
8f14967
Compare
there was some rebase issue, I have updated this PR to latest, Thanks |
jenkins compile win jdk11 |
Use consistent data types and code formatting