~/talk

CONSTANT_Dynamic

slides:none on file

JDK 11 adds Constant_Dynamic (Condy), a bootstrap-linked constant that puts JSR-292 style linkage into the constant pool so LDC can return runtime-computed constants directly instead of wrapping them in CallSite/methodhandle indirections. Condy stores primitive class mirrors, stores varhandles and null and enum constants, and reduces repeated bootstrap overhead and identity duplication (non-capturing lambdas/method refs can be emitted as LDC so the bootstrap runs once). Guidance: use java.lang.invoke.ConstantBootstraps, make bootstraps idempotent, beware resolution races and classloader lifetime leaks. Future work: bootstrap call info lazy resolution and extended invocation modes.

AI-written summary · about

  1. 0:00Start
  2. 2:43Invokedynamic refresher: bootstrap method
  3. 3:10Invokedynamic refresher: linked
  4. 15:23Pitfalls
  5. 20:05ORACLE Safe Harbor Statement
  6. 23:39ConstantBootstraps :: invoke
  7. 24:36Drop metadata arguments
  8. 26:19A more generic solution
  9. 28:05Lazy resolution of bootstrap method arguments
  10. 30:07Resolve arguments on demand
  11. 31:20Access an argument in nominal form
  12. 32:23BSM invocation summary
  13. 32:42Java 12?
  14. 33:40invoke dynamic
  15. 35:44in the main repo
  16. 36:09in the amber repo
  17. 36:51General data in the constant pool
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.