Discussion:
RFR: 8184777: Factor out species generation logic from BoundMethodHandle
Claes Redestad
2017-11-13 16:34:53 UTC
Permalink
Hi,

 this patch factors out the BoundMethodHandle species data class
generation to a new ClassSpecializer facility.

 While currently semantically neutral, this will make it possible
to reuse the facility in other places.

 Webrev: http://cr.openjdk.java.net/~redestad/8184777/open.00/
 Bug: https://bugs.openjdk.java.net/browse/JDK-8184777

 Performance wise this adds a very small (~20k bytecode) amount
of work to the initialization costs of BMHs, which we expect will
be more than repaid as we apply the ClassSpecializer elsewhere.

 Thanks!

/Claes
Vladimir Ivanov
2017-11-13 16:38:44 UTC
Permalink
Looks good!

Best regards,
Vladimir Ivanov
Post by Claes Redestad
Hi,
 this patch factors out the BoundMethodHandle species data class
generation to a new ClassSpecializer facility.
 While currently semantically neutral, this will make it possible
to reuse the facility in other places.
 Webrev: http://cr.openjdk.java.net/~redestad/8184777/open.00/
 Bug: https://bugs.openjdk.java.net/browse/JDK-8184777
 Performance wise this adds a very small (~20k bytecode) amount
of work to the initialization costs of BMHs, which we expect will
be more than repaid as we apply the ClassSpecializer elsewhere.
 Thanks!
/Claes
Claes Redestad
2017-11-13 16:41:14 UTC
Permalink
Thanks Vladimir!

/Claes
Post by Vladimir Ivanov
Looks good!
Best regards,
Vladimir Ivanov
Hi,
  this patch factors out the BoundMethodHandle species data class
generation to a new ClassSpecializer facility.
  While currently semantically neutral, this will make it possible
to reuse the facility in other places.
  Webrev: http://cr.openjdk.java.net/~redestad/8184777/open.00/
  Bug: https://bugs.openjdk.java.net/browse/JDK-8184777
  Performance wise this adds a very small (~20k bytecode) amount
of work to the initialization costs of BMHs, which we expect will
be more than repaid as we apply the ClassSpecializer elsewhere.
  Thanks!
/Claes
Christoph Dreis
2017-11-13 17:56:06 UTC
Permalink
Hey Claes,

though far away from being an expert on the subject matter, I have some very minor comments if you don't mind.

ClassSpecializer.java
L510: * For example, a concrete species for two reference and one integral bound values have a shape like the following:
Should be imho:
L510: * For example, a concrete species for two references and one integral bound value has a shape like the following:

LambdaFormBuffer.java:
L333: if (oldFns.size() == 0) return this;
Could be:
L333: if (oldFns.isEmpty()) return this;

Cheers,
Christoph
-----Original Message-----
Behalf Of Claes Redestad
Sent: Monday, November 13, 2017 5:35 PM
Subject: RFR: 8184777: Factor out species generation logic from
BoundMethodHandle
Hi,
this patch factors out the BoundMethodHandle species data class
generation to a new ClassSpecializer facility.
While currently semantically neutral, this will make it possible to reuse the
facility in other places.
Webrev: http://cr.openjdk.java.net/~redestad/8184777/open.00/
Bug: https://bugs.openjdk.java.net/browse/JDK-8184777
Performance wise this adds a very small (~20k bytecode) amount of work to
the initialization costs of BMHs, which we expect will be more than repaid as
we apply the ClassSpecializer elsewhere.
Thanks!
/Claes
Loading...