Current implementation forces a value class to be atomic if it contains atomic flat fields, but this is policy prevents the flattening of big loosely consistent values.
The policy should changed to flatten atomic fields only in atomic containers for now.
In the future, we might want to be able to flatten atomic values inside non-atomic containers, but we have to be sure that the inner values are then always copied atomically. The way the interpreter and the runtime perform the bulk copying already guarantees that. Once the JITs are able to provide the same guarantees, the flattening policy will be updated again.
The policy should changed to flatten atomic fields only in atomic containers for now.
In the future, we might want to be able to flatten atomic values inside non-atomic containers, but we have to be sure that the inner values are then always copied atomically. The way the interpreter and the runtime perform the bulk copying already guarantees that. Once the JITs are able to provide the same guarantees, the flattening policy will be updated again.
- links to
-
Commit(lworld) openjdk/valhalla/56810912
-
Review(lworld) openjdk/valhalla/1325