Skip to content

Commit

Permalink
Rename isArrayCompTypePrimitiveValueType
Browse files Browse the repository at this point in the history
Rename `isArrayCompTypePrimitiveValueType`
to `isArrayNullRestricted` to reflect the updated logic

Signed-off-by: Annabelle Huo <[email protected]>
  • Loading branch information
a7ehuo committed Sep 1, 2024
1 parent 6e2377c commit 0353738
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion compiler/optimizer/OMRValuePropagation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1690,7 +1690,7 @@ TR_YesNoMaybe OMR::ValuePropagation::isCastClassObject(TR::VPClassType *type)
}


TR_YesNoMaybe OMR::ValuePropagation::isArrayCompTypePrimitiveValueType(TR::VPConstraint *arrayConstraint)
TR_YesNoMaybe OMR::ValuePropagation::isArrayNullRestricted(TR::VPConstraint *arrayConstraint)
{
return TR::Compiler->om.areFlattenableValueTypesEnabled() ? TR_maybe : TR_no;
}
Expand Down
10 changes: 5 additions & 5 deletions compiler/optimizer/OMRValuePropagation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,14 +367,14 @@ class ValuePropagation : public TR::Optimization
TR_YesNoMaybe isCastClassObject(TR::VPClassType *type);

/**
* Determine whether the component type of an array is, or might be, a primitive value
* type.
* Determine whether the array is, or might be, null restricted
*
* \param arrayConstraint The \ref TR::VPConstraint type constraint for the array reference
* \returns \c TR_yes if the array's component type is definitely a primitive value type;\n
* \c TR_no if it is definitely not a primitive value type; or\n
* \returns \c TR_yes if the array is definitely a null restricted array;\n
* \c TR_no if it is definitely not a null restricted array; or\n
* \c TR_maybe otherwise.
*/
virtual TR_YesNoMaybe isArrayCompTypePrimitiveValueType(TR::VPConstraint *arrayConstraint);
virtual TR_YesNoMaybe isArrayNullRestricted(TR::VPConstraint *arrayConstraint);

/**
* \brief
Expand Down
4 changes: 2 additions & 2 deletions compiler/optimizer/ValuePropagationCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1324,8 +1324,8 @@ void OMR::ValuePropagation::transformArrayCopyCall(TR::Node *node)
!primitiveArray2 &&
(copyLen != _constantZeroConstraint)) // Not zero length copy
{
isDstArrayCompTypePrimitiveValueType = isArrayCompTypePrimitiveValueType(dstObject);
isSrcArrayCompTypePrimitiveValueType = isArrayCompTypePrimitiveValueType(srcObject);
isDstArrayCompTypePrimitiveValueType = isArrayNullRestricted(dstObject);
isSrcArrayCompTypePrimitiveValueType = isArrayNullRestricted(srcObject);

switch (isDstArrayCompTypePrimitiveValueType)
{
Expand Down

0 comments on commit 0353738

Please sign in to comment.