The GitHub Actions job "Pull Requests" on pekko.git/refactor/replace-reflection-with-methodhandles has failed. Run started by GitHub user He-Pin (triggered by He-Pin).
Head commit for run: b181a3c8839a18d14e20570b2a5e2ceb61ae93b8 / 虎鸣 <[email protected]> refactor: replace java.lang.reflect with MethodHandle/VarHandle across core modules Motivation: java.lang.reflect Method.invoke, Constructor.newInstance, and Field.get/set bypass JIT inlining, adding overhead in critical paths like actor instantiation, protobuf serialization, and virtual thread management. Modification: - ReflectiveDynamicAccess: replace Constructor.newInstance with MethodHandle.invokeWithArguments; replace Field.get(null) for MODULE$ with VarHandle.get - Reflect: replace Constructor.newInstance with MethodHandle.invoke for both no-arg and parameterized constructors - VirtualThreadSupport: replace Field.set/get with VarHandle.set/get for scheduler and DEFAULT_SCHEDULER fields; replace Constructor.newInstance with cached MethodHandle for CarrierThread - ProtobufSerializer: replace Method-based parseFrom/toByteArray caches with MethodHandle caches for serialization hot path - LineNumbers: replace Method.invoke with MethodHandle.invoke for writeReplace lambda introspection - ByteBufferCleaner: replace Field.get(null) with VarHandle.get for theUnsafe static field access - ExtensionsImpl: replace Method.invoke(null) with MethodHandle.invoke for Java singleton getInstance accessor Result: VarHandle and MethodHandle enable JIT inlining of field access, method invocation, and constructor calls across all core reflection utilities, improving performance in actor creation, serialization, and virtual thread operations. Tests: - sbt "actor / compile" - success - sbt "actor-typed / compile" - success - sbt "remote / compile" - success References: None - internal refactoring Report URL: https://github.com/apache/pekko/actions/runs/28778445644 With regards, GitHub Actions via GitBox --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
