Skip to content

Commit

Permalink
Merge pull request #7330 from hzongaro/correct-mentions-of-classDepth…
Browse files Browse the repository at this point in the history
…AndFlags

Correct typos mentioning classDepthAndFlags field
  • Loading branch information
0xdaryl authored May 9, 2024
2 parents 9a431c4 + 59be3a5 commit b9a6ccc
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 5 deletions.
1 change: 1 addition & 0 deletions compiler/compile/OMRNonHelperSymbols.enum
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
componentClassSymbol,
isArraySymbol,
isClassAndDepthFlagsSymbol,
isClassDepthAndFlagsSymbol = isClassAndDepthFlagsSymbol,
isClassFlagsSymbol,
vftSymbol,
currentThreadSymbol,
Expand Down
8 changes: 7 additions & 1 deletion compiler/compile/OMRSymbolReferenceTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,12 @@ OMR::SymbolReferenceTable::findClassIsArraySymbolRef()
}


TR::SymbolReference *
OMR::SymbolReferenceTable::findClassDepthAndFlagsSymbolRef()
{
return element(isClassDepthAndFlagsSymbol);
}

TR::SymbolReference *
OMR::SymbolReferenceTable::findClassAndDepthFlagsSymbolRef()
{
Expand Down Expand Up @@ -2142,7 +2148,7 @@ const char *OMR::SymbolReferenceTable::_commonNonHelperSymbolNames[] =
"<addressOfClassOfMethod>",
"<componentClass>",
"<isArray>",
"<isClassAndDepthFlags>",
"<isClassDepthAndFlags>",
"<isClassFlags>",
"<vft>",
"<currentThread>",
Expand Down
2 changes: 2 additions & 0 deletions compiler/compile/OMRSymbolReferenceTable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ class SymbolReferenceTable
componentClassAsPrimitiveSymbol,
isArraySymbol,
isClassAndDepthFlagsSymbol,
isClassDepthAndFlagsSymbol = isClassAndDepthFlagsSymbol,
initializeStatusFromClassSymbol,
isClassFlagsSymbol,
vftSymbol,
Expand Down Expand Up @@ -773,6 +774,7 @@ class SymbolReferenceTable
TR::SymbolReference * findDescriptionWordFromPtrSymbolRef();
TR::SymbolReference * findClassFlagsSymbolRef();
TR::SymbolReference * findClassAndDepthFlagsSymbolRef();
TR::SymbolReference * findClassDepthAndFlagsSymbolRef();
TR::SymbolReference * findArrayComponentTypeSymbolRef();
TR::SymbolReference * findClassIsArraySymbolRef();
TR::SymbolReference * findHeaderFlagsSymbolRef() { return element(headerFlagsSymbol); }
Expand Down
2 changes: 1 addition & 1 deletion compiler/optimizer/LoopVersioner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8105,7 +8105,7 @@ bool TR_LoopVersioner::suppressInvarianceAndPrivatization(TR::SymbolReference *s
return true;

// Class flags are mutable.
case TR::SymbolReferenceTable::isClassAndDepthFlagsSymbol:
case TR::SymbolReferenceTable::isClassDepthAndFlagsSymbol:
return true;

#ifdef J9_PROJECT_SPECIFIC
Expand Down
4 changes: 2 additions & 2 deletions compiler/optimizer/VPHandlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1521,7 +1521,7 @@ bool simplifyJ9ClassFlags(OMR::ValuePropagation *vp, TR::Node *node, bool isLong
TR::VPConstraint *base = vp->getConstraint(node->getFirstChild(), isGlobal);
TR::SymbolReference *symRef = node->getSymbolReference();

if (symRef == vp->comp()->getSymRefTab()->findClassAndDepthFlagsSymbolRef() &&
if (symRef == vp->comp()->getSymRefTab()->findClassDepthAndFlagsSymbolRef() &&
base &&
base->isJ9ClassObject() == TR_yes &&
base->getClassType() &&
Expand Down Expand Up @@ -7647,7 +7647,7 @@ TR::Node *constrainIand(OMR::ValuePropagation *vp, TR::Node *node)
firstChild = firstChild->getChild(0);

if ((firstChild->getOpCodeValue() == TR::iloadi || firstChild->getOpCodeValue() == TR::lloadi) &&
(firstChild->getSymbolReference() == vp->comp()->getSymRefTab()->findClassAndDepthFlagsSymbolRef()) &&
(firstChild->getSymbolReference() == vp->comp()->getSymRefTab()->findClassDepthAndFlagsSymbolRef()) &&
(rhs->getLowInt() == TR::Compiler->cls.flagValueForArrayCheck(vp->comp())))
{
if (vp->trace())
Expand Down
2 changes: 1 addition & 1 deletion compiler/ras/Debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2078,7 +2078,7 @@ static const char *commonNonhelperSymbolNames[] =
"<componentClass>",
"<componentClassAsPrimitive>",
"<isArray>",
"<isClassAndDepthFlags>",
"<isClassDepthAndFlags>",
"<initializeStatusFromClass>",
"<isClassFlags>",
"<vft>",
Expand Down

0 comments on commit b9a6ccc

Please sign in to comment.