~/talk

Constants in Amber

links:none on file
slides:none on file

Adds a new constant pool entry, ConstantDynamic (tag 17), that lets a bootstrap method return any constant so ldc or bootstrap static args can represent values previously impossible (int.class, enums, method handles, vhandles, etc.); implements a special bootstrap arity-two lazy resolution mode to defer resolution until use; enhances javac with compiler intrinsics for ldc/invokedynamic and a "constable"/trackable-constant API and annotation so expressions fold into constant pool entries. Prototype lives in the Amber repo and is implemented end-to-end, but needs careful immutability and security checks.

AI-written summary · about

  1. 0:00Intro
  2. 0:52Goals
  3. 1:53Runtime code
  4. 2:34What can reference constant values?
  5. 7:25What about?
  6. 8:21Just use static final fields?
  7. 12:12Bootstrap method invocation
  8. 14:03New signature forms of bootstrap methods
  9. 15:23Invocation with BootstrapCallInfo
  10. 16:08Constraints
  11. 18:30Typed bootstrap methods?
  12. 20:37Runtime and language code
  13. 21:06Motivation
  14. 28:49More work for the compiler
  15. 30:50Exposing LDC
  16. 32:41Exposing indy
  17. 35:15Indy in the source code!!
  18. 37:48Right, but what about code generation?
  19. 38:49Summary
~/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.