Skip to content
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

Fix null restricted array related issues for value types #20112

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Oct 8, 2024

  1. Add utility methods for null restricted arrays

    Whether or not an array is null-restricted is no longer
    decided by array component type but by the
    J9ClassArrayIsNullRestricted flag in array class.
    
    Only the nullRestrictedArrayClass of the J9Class has
    J9ClassArrayIsNullRestricted set.
    
    (1)
    Add getNullRestrictedArrayClassFromComponentClass
    to retrieve nullRestrictedArrayClass from J9Class
    
    (2)
    Add isArrayNullRestricted to check if an array class
    is null restricted by checking J9ClassArrayIsNullRestricted.
    
    Signed-off-by: Annabelle Huo <[email protected]>
    a7ehuo committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    190c1fa View commit details
    Browse the repository at this point in the history
  2. Fix null restricted array related issues

    (1) Add recognized methods from jdk/internal/value/ValueClass
    
    (2)
    Add VP fixed class constraint if ValueClass.newArrayInstance
    creates null restricted array using NullRestrictedCheckedType
    
    (3)
    Rename isArrayCompTypePrimitiveValueType
    to isArrayNullRestricted to reflect the updated logic
    
    Update isArrayNullRestricted on how to determine
    whether or not an array is a null restricted array
    
    (4)
    Disable transformation based on type hint which is no longer
    sufficient enough to decide whether or not the array is null
    restricted or not
    
    (5)
    If flattenable arrays are enabled, do not create fixed class
    constraint for parm array class based on signature since
    both nullable and null restricted arrays share the same signature
    
    (6)
    Enable previous disabled JIT Valhalla functional tests
    
    Fixes: eclipse-openj9#19913, eclipse-openj9#19914, eclipse-openj9#19708
    
    Signed-off-by: Annabelle Huo <[email protected]>
    a7ehuo committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    3af4ff9 View commit details
    Browse the repository at this point in the history