The GitHub Actions job "Pull Requests" on 
pekko.git/refactor/replace-reflection-with-methodhandles has succeeded.
Run started by GitHub user He-Pin (triggered by He-Pin).

Head commit for run:
aa26fbe19898b6d3eae2ab9dc43cb67bdbad4681 / 虎鸣 <[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;
  use Class.forName universally; prefer publicLookup for public constructors
- VirtualThreadSupport: replace Field.set/get with VarHandle.set/get
- ProtobufSerializer: replace Method-based caches with MethodHandle caches
- LineNumbers: replace Method.invoke with MethodHandle.invoke
- ByteBufferCleaner: replace Field.get(null) with VarHandle.get
- ExtensionsImpl: replace Method.invoke(null) with MethodHandle.invoke
- Replace java.lang.reflect with ClassGraph in test suites

Result:
JIT-inlinable field access and method invocation across all core reflection
utilities, improving performance in actor creation, serialization, and
virtual thread operations.

Tests:
- sbt ++3.3.8 actor-tests/Test/testOnly org.apache.pekko.util.ReflectSpec
- sbt ++3.3.8 remote/Test/testOnly 
org.apache.pekko.remote.serialization.MiscMessageSerializerSpec
- sbt ++3.3.8 actor-tests/Test/testOnly org.apache.pekko.actor.ActorCreationTest

Refs #3300

Report URL: https://github.com/apache/pekko/actions/runs/28808116820

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to