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

Value Types: Replace checking Q type with checking NullRestricted attribute #18170

Open
2 of 3 tasks
a7ehuo opened this issue Sep 20, 2023 · 1 comment
Open
2 of 3 tasks
Labels
comp:jit project:valhalla Used to track Project Valhalla related work

Comments

@a7ehuo
Copy link
Contributor

a7ehuo commented Sep 20, 2023

As mentioned in #17340, NullRestricted attribute is introduced. This issue is created to track all changes required in the JIT to replace checking Q type with checking NullRestricted attribute.

Below is a list of files that currently checks/use Q type.

  1. addEntryForFieldImpl
    isFieldPrimitiveValueType = vm->internalVMFunctions->isNameOrSignatureQtype(signature);
  2. TR_ResolvedJ9Method::isFieldQType
    return vmThread->javaVM->internalVMFunctions->isNameOrSignatureQtype(signature);
  3. TR_ResolvedJ9JITServerMethod::isFieldQType
    return vmThread->javaVM->internalVMFunctions->isNameOrSignatureQtype(utfWrapper);
  4. TR_J9ByteCodeIlGenerator::loadInstance
    else if (owningMethod->isFieldQType(cpIndex))
  5. TR_J9ByteCodeIlGenerator::genWithField
    else if (owningMethod->isFieldQType(fieldCpIndex))
  6. TR_J9ByteCodeIlGenerator::storeInstance
    else if (owningMethod->isFieldQType(cpIndex))
  7. TR_J9ByteCodeIlGenerator::storeStatic
    else if (owningMethod->isFieldQType(cpIndex))
  8. TR_J9ByteCodeIlGenerator::genAconst_init
    else if (fieldSignature[0] == 'Q')
  9. J9::ClassEnv::isClassRefPrimitiveValueType
    return vm->internalVMFunctions->isClassRefQtype(j9class, cpIndex);
  10. JITClientCompilationThread.cpp
    case MessageType::ClassEnv_isClassRefPrimitiveValueType:
  11. MessageTypes.hpp and MessageTypes.cpp
    "ClassEnv_isClassRefPrimitiveValueType",

    ClassEnv_isClassRefPrimitiveValueType,
  12. A list of files that we can simply remove using Q type from when Q is no longer generated in the signature
    TR::Compiler->om.isQDescriptorForValueTypesSupported() &&

    TR::Compiler->om.isQDescriptorForValueTypesSupported() &&

    TR::Compiler->om.isQDescriptorForValueTypesSupported() &&

    TR::Compiler->om.isQDescriptorForValueTypesSupported() &&
@a7ehuo a7ehuo added comp:jit project:valhalla Used to track Project Valhalla related work labels Sep 20, 2023
@a7ehuo
Copy link
Contributor Author

a7ehuo commented Sep 20, 2023

@hzongaro fyi

a7ehuo added a commit to a7ehuo/openj9 that referenced this issue Sep 25, 2023
`NullRestricted` field attribute is introduced in JEP 401.
- Create API to check `NullRestricted`
- Replace calls to `isFieldQType` with `isFieldNullRestricted`
- Remove `isClassRefPrimitiveValueType`
- Update the test to test JIT'd methods

Related: eclipse-openj9#18170

Signed-off-by: Annabelle Huo <[email protected]>
a7ehuo added a commit to a7ehuo/omr that referenced this issue Sep 25, 2023
a7ehuo added a commit to a7ehuo/openj9 that referenced this issue Oct 3, 2023
midronij pushed a commit to midronij/openj9 that referenced this issue Oct 26, 2023
midronij pushed a commit to midronij/omr that referenced this issue Oct 26, 2023
sarwat12 pushed a commit to sarwat12/omr that referenced this issue Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:jit project:valhalla Used to track Project Valhalla related work
Projects
None yet
Development

No branches or pull requests

1 participant