Add classfile-api module: java.lang.classfile (JEP 484) parse, generate, transform with timing instrumentation, ASM 9.11.1 comparison, version limits, JDK 24/25/26 API diff

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b4VQVEJWetTT1dYzyJ
This commit is contained in:
2026-10-29 04:14:57 +00:00
co-authored by Claude Sonnet 5.5
parent eca73ad544
commit 41101bea40
37 changed files with 1763 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
$ java -cp classes:asm-9.11.1.jar... demo.TransformDemo target/instrumented (25.0.5+8-LTS)
original 1488 bytes, naive 1799 bytes, with exception handler 2155 bytes
-- naive: time normal returns only (1799 bytes; verify() problems: 0)
PASS naive: time normal returns only: demo.Target here is a different Class object than the one on the class path
boom() threw java.lang.IllegalStateException: boom
explode() threw ArrayIndexOutOfBoundsException
fib recorded 177 call(s)
sumTo recorded 1 call(s)
greet recorded 1 call(s)
pause recorded 1 call(s)
boom recorded 0 call(s)
explode recorded 0 call(s)
PASS naive version never records the two methods that throw
PASS fib(10) makes 177 calls and 177 timings were recorded (recursion included)
-- full: also time when an exception leaves the method (2155 bytes; verify() problems: 0)
PASS full: also time when an exception leaves the method: demo.Target here is a different Class object than the one on the class path
boom() threw java.lang.IllegalStateException: boom
explode() threw ArrayIndexOutOfBoundsException
fib recorded 177 call(s)
sumTo recorded 1 call(s)
greet recorded 1 call(s)
pause recorded 1 call(s)
boom recorded 1 call(s)
explode recorded 1 call(s)
PASS exception-safe version records boom() and explode() once each
PASS fib still recorded 177 times
PASS sumTo and greet recorded once each
PASS pause(50) was recorded as at least 50 ms (>= 50,000,000 ns)
PASS fib(20) gives the same answer before and after
PASS sumTo(12345) gives the same answer before and after
exit=0