Explore the concept of constants in Amber through this 46-minute Java conference talk featuring Vicente Romero and Paul Sandoz. Delve into the limitations of constant pool entries in class files and Java compiler constant folding. Learn about the new ConstantDynamic entry, which expands the possibilities for expressing constants using bootstrap methods. Discover how enhanced constant folding in the Java compiler enables the expression of invokedynamic, ldc, and ConstantDynamic in Java language. Understand the implementation of compiler "intrinsics" for ldc and invokedynamic with constant arguments. Cover topics such as runtime code, constant value references, bootstrap method invocation, new signature forms, constraints, and typed bootstrap methods. Gain insights into the motivations behind these changes, the increased compiler workload, and the implications for exposing LDC and invokedynamic in source code and code generation.
Constants in Amber - Enhancing Java's Constant Pool and Compiler Folding