Overview
Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
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.
Syllabus
Intro
Goals
Runtime code
What can reference constant values?
What about?
Just use static final fields?
Bootstrap method invocation
New signature forms of bootstrap methods
Invocation with BootstrapCallInfo
Constraints
Typed bootstrap methods?
Runtime and language code
Motivation
More work for the compiler
Exposing LDC
Exposing indy
Indy in the source code!!
Right, but what about code generation?
Summary
Taught by
Java