Just a Small Class File Change Nest
summary
Proposal teaches the JVM a trusted group of classes by adding nest host and nest members attributes, removes compiler-generated private trampolines, changes private-access checks and moves some validation to lazy access-time so missing outer classes and startup cost stay safe. Production work updates bytecode selection with an invokevirtual/invokeinterface change (avoiding invoke special), expands reflection APIs, runs prototype tests across runtimes, and lands static nestmates in Java SE 11. Ongoing work targets dynamic nest membership and a non-findable class + lookup.defineClass path to replace unsafe defineAnonymousClass.
AI-written summary · about
chapters (28)
- 0:00Intro
- 4:20Example: Nested Class Trampolines
- 6:45Proposal: Nestmates
- 7:49Just a Small Class File Change
- 10:20JVMS Draft: Class File Attributes
- 12:29JVMS Member Access Controls (Java SE 10)
- 13:14Member Access Check: Java SE 10
- 13:51Proof of Concept: Implement and Test
- 16:04Design Areas
- 16:58Class File Attributes Implementation Challenges
- 18:43JVMS Details: Class File Attributes
- 19:33Access Controls Implementation Challenges
- 20:30JVMS 5.4.4 Access Control Changes
- 20:51JVMS 5.4.4 Nestmate Test
- 21:33Alternate Accessors
- 22:38Method Invocation
- 27:22JVMS Method Selection Update
- 29:15Production Quality
- 30:24Production Level Implementation
- 31:16Class File Readers and Writers
- 32:57Test Creation
- 34:31Nestmates Futures: Problems
- 36:55Lookup.defineClass() Evolution
- 38:21Dynamic Nestmates
- 39:20Non-Findable Classes
- 40:10Unsafe::defineAnonymousClass() Migration
- 40:54Alternative to Constant Pool Patching
- 42:41Questions
related talks
32mUnveiling the Hidden Layers of Java Class Files Beyond Bytecode
47mFrontiers of Access Controls: Modules and Nestmates
45mMaking Java more dynamic
55mMaking Java more dynamic
50mTo Java 20 and Beyond
40mSailing Java 16
57mNashorn for Java 9
53mWell there's your problem! Your engine's missing! A look under Java's hood
