RFR: 8347396: Efficient TypeFunc creations [v5]

Dean Long dlong at openjdk.org
Fri Jan 30 04:00:49 UTC 2026


On Tue, 27 Jan 2026 09:59:47 GMT, Harshit470250 <duke at openjdk.org> wrote:

>> src/hotspot/share/opto/runtime.hpp line 235:
>> 
>>> 233:   static void monitor_notify_C(oopDesc* obj, JavaThread* current);
>>> 234:   static void monitor_notifyAll_C(oopDesc* obj, JavaThread* current);
>>> 235:   static const TypeFunc* _clone_type_Type;
>> 
>> hotspot generally avoids public data members other than in simple data structs.
>
> clone_type() is not a member function of OptoRuntime, Should I define a getter function?

I suggest you do it the same as the ShenandoahBarrierSetC2 types.  That would mean moving _clone_type_Type to BarrierSetC2 and setting it in make_clone_type(), just like you did for all ShenandoahBarrierSetC2::make_*_Type().

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/27279#discussion_r2744506683


More information about the hotspot-dev mailing list