The sinuous path toward Valhalla
summary
Project Valhalla adds inline objects as value types that are non‑null and immutable, claiming big cache and pointer‑dereference savings and showing JMH cases where arrays of inline wrappers match primitive arrays. Implementation uses new bytecode descriptors (Q for inline types) and two opcodes (default_value and withfield), plus prototypes MVT and LWorld available as early‑access builds. Remaining work: erased generics break (requires lightweight boxing via sealed interfaces), equals== semantics, array/JIT checks and concurrency corner cases; preview JDK target but not yet final.
AI-written summary · about
chapters (15)
- 0:00Start
- 4:20At Java inception
- 7:11Inline object (first draft)
- 9:10Aliasing issue in C/C++
- 11:01Inlineable
- 18:40Open JDK projects dependency Panama - Vector API (SIMD, AVX support)
- 25:46Object = root of every objects
- 26:33L-world conversion
- 27:28Problem: class late loading
- 28:18Inline class loading but inline classes need to be loaded early - memory layout - method caling sequence
- 31:28Problem: class initialization
- 41:12Problem: array covariance
- 44:28No identity, == (aka acmp)
- 46:22Problem: erased generics
- 51:17Inline class - preview
