Skip to content

Commit

Permalink
Correct "null restricted" to null-restricted
Browse files Browse the repository at this point in the history
Signed-off-by: Theresa Mammarella <[email protected]>
  • Loading branch information
theresa-m committed Aug 29, 2024
1 parent 7aa2ef9 commit bc14f65
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion runtime/compiler/env/J9ClassEnv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class OMR_EXTENSIBLE ClassEnv : public OMR::ClassEnvConnector
* the criteria that NO field is of
* - type double (D) or float (F)
* - nullable-class/interface type
* - null restricted class type that are not both flattened and recursively
* - null-restricted class type that are not both flattened and recursively
* compatible for direct memory comparison
*
* \param clazz
Expand Down
2 changes: 1 addition & 1 deletion runtime/compiler/env/J9ObjectModel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class ObjectModel : public OMR::ObjectModelConnector
bool areValueTypesEnabled();

/**
* @brief Whether or not flattenable value object (aka null restricted) type is enabled
* @brief Whether or not flattenable value object (aka null-restricted) type is enabled
*/
bool areFlattenableValueTypesEnabled();

Expand Down
4 changes: 2 additions & 2 deletions runtime/compiler/optimizer/J9ValuePropagation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1273,7 +1273,7 @@ J9::ValuePropagation::constrainRecognizedMethod(TR::Node *node)
flagsForTransform.set(ValueTypesHelperCallTransform::RequiresStoreCheck);
}

// If the value being stored is NULL and the destination array component is null restricted in runtime,
// If the value being stored is NULL and the destination array component is null-restricted at runtime,
// a NPE is expected to throw. Therefore, when the array component type is not known to be identity type
// in compilation time, a NULLCHK on store value is required
if ((isCompTypePrimVT != TR_no) &&
Expand Down Expand Up @@ -2971,7 +2971,7 @@ TR_YesNoMaybe
J9::ValuePropagation::isArrayCompTypePrimitiveValueType(TR::VPConstraint *arrayConstraint)
{
if (!TR::Compiler->om.areValueTypesEnabled() ||
!TR::Compiler->om.areFlattenableValueTypesEnabled()) // Only null restricted or primitive value type are flattenable
!TR::Compiler->om.areFlattenableValueTypesEnabled()) // Only null-restricted or primitive value type are flattenable
{
return TR_no;
}
Expand Down
14 changes: 7 additions & 7 deletions runtime/oti/vm_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -2709,11 +2709,11 @@ BOOLEAN
valueTypeCapableAcmp(J9VMThread *currentThread, j9object_t lhs, j9object_t rhs);

/**
* Determines if null restricted attribute is set on a field or not.
* Determines if null-restricted attribute is set on a field or not.
*
* @param[in] field The field to be checked
*
* @return TRUE if the field has null restricted attribute set, FALSE otherwise
* @return TRUE if the field has null-restricted attribute set, FALSE otherwise
*/
BOOLEAN
isFieldNullRestricted(J9ROMFieldShape *field);
Expand Down Expand Up @@ -2817,7 +2817,7 @@ getFlattenableFieldOffset(J9Class *fieldOwner, J9ROMFieldShape *field);

/**
* Returns if a field is flattened. `J9_IS_J9CLASS_FLATTENED` will be deprecated.
* This helper assumes field is null restricted.
* This helper assumes field is null-restricted.
*
* @param[in] fieldOwner the J9class that defines the field
* @param[in] field romfieldshape of the field
Expand All @@ -2829,7 +2829,7 @@ isFlattenableFieldFlattened(J9Class *fieldOwner, J9ROMFieldShape *field);

/**
* Returns the type of an instance field. `J9_IS_J9CLASS_FLATTENED` will be deprecated.
* This helper assumes field is null restricted.
* This helper assumes field is null-restricted.
*
* @param[in] fieldOwner the J9class that defines the field
* @param[in] field romfieldshape of the field
Expand All @@ -2841,7 +2841,7 @@ getFlattenableFieldType(J9Class *fieldOwner, J9ROMFieldShape *field);

/**
* Returns the size of an instance field. `J9_VALUETYPE_FLATTENED_SIZE` will be deprecated.
* This helper assumes field is null restricted.
* This helper assumes field is null-restricted.
*
* @param[in] currentThread thread token
* @param[in] fieldOwner the J9class that defines the field
Expand All @@ -2865,7 +2865,7 @@ arrayElementSize(J9ArrayClass* arrayClass);

/**
* Performs a getfield operation on an object. Handles flattened and non-flattened cases.
* This helper assumes that the cpIndex points to a resolved null restricted fieldRef. This helper
* This helper assumes that the cpIndex points to a resolved null-restricted fieldRef. This helper
* also assumes that the cpIndex points to an instance field.
*
* @param currentThread thread token
Expand Down Expand Up @@ -2895,7 +2895,7 @@ cloneValueType(J9VMThread *currentThread, J9Class *receiverClass, j9object_t ori

/**
* Performs a putfield operation on an object. Handles flattened and non-flattened cases.
* This helper assumes that the cpIndex points to a resolved null restricted fieldRef. This helper
* This helper assumes that the cpIndex points to a resolved null-restricted fieldRef. This helper
* also assumes that the cpIndex points to an instance field.
*
* @param currentThread thread token
Expand Down
8 changes: 4 additions & 4 deletions runtime/vm/BytecodeInterpreter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8591,10 +8591,10 @@ class INTERPRETER_CLASS
}
}

/* In the future Valhalla checkcast needs to throw exception on
* null restricted checkedType if obj is null,
* see issue https://github.com/eclipse-openj9/openj9/issues/19764
*/
/* In the future, Valhalla checkcast must throw an exception on
* null-restricted checkedType if object is null.
* See issue https://github.com/eclipse-openj9/openj9/issues/19764.
*/

_pc += 3;
done:
Expand Down
4 changes: 2 additions & 2 deletions runtime/vm/ValueTypeHelpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,11 @@ class VM_ValueTypeHelpers {
}

/**
* Determines if null restricted attribute is set on a field or not.
* Determines if null-restricted attribute is set on a field or not.
*
* @param[in] field The field to be checked
*
* @return TRUE if the field has null restricted attribute set, FALSE otherwise
* @return TRUE if the field has null-restricted attribute set, FALSE otherwise
*/
static VMINLINE bool
isFieldNullRestricted(J9ROMFieldShape *field)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ static private void evalTestEA3() {
}
}

/* A value class with an implicit constructor (eligible to be null restricted)
* with null restricted value class fields.
/* A value class with an implicit constructor (eligible to be null-restricted)
* with null-restricted value class fields.
*/
public value static class NestedFlattenablePair {
public final FlattenablePair! p1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public class ValueTypeTests {

/* fields */
static String typeWithSingleAlignmentFields[] = {
"tri:LTriangle2D;:NR", /* NR means null restricted */
"tri:LTriangle2D;:NR", /* NR means null-restricted */
"point:LPoint2D;:NR",
"line:LFlattenedLine2D;:NR",
"i:LValueInt;:NR",
Expand Down Expand Up @@ -1817,7 +1817,7 @@ static public void testCreateLargeObjectAndMegaRef() throws Throwable {
* Create a value type and read the fields before
* they are set. The test should Verify that the
* flattenable fields are set to the default values.
* NULL should never be observed for null restricted fields.
* NULL should never be observed for null-restricted fields.
*/
@Test(priority=4)
static public void testDefaultValues() throws Throwable {
Expand Down Expand Up @@ -2275,7 +2275,7 @@ static public void testDefaultValueInAssortedRefWithLongAlignmentArray() throws
* Ensure that casting null to a value type class will throw a null pointer exception
* This test is disabled since the latest spec from
* https://cr.openjdk.org/~dlsmith/jep401/jep401-20230519/specs/types-cleanup-jvms.html
* no longer requires null check on the objectref for null restricted value type class
* no longer requires null check on the objectref for null-restricted value type class
*/
@Test(enabled=false, priority=1, expectedExceptions=NullPointerException.class)
static public void testCheckCastNullRestrictedTypeOnNull() throws Throwable {
Expand Down

0 comments on commit bc14f65

Please sign in to comment.