On Fri, 28 Feb 2025 10:37:17 GMT, Maurizio Cimadamore <mcimadam...@openjdk.org> wrote:
>> Chen Liang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> noStride -> constantOffset, optimize VH classes to have only 2 instead of >> 3 classes for each type > > src/java.base/share/classes/java/lang/invoke/X-VarHandleSegmentView.java.template > line 53: > >> 51: >> 52: static final VarForm CONSTANT_OFFSET_FORM = new >> VarForm(VarHandleSegmentAs$Type$s.class, MemorySegment.class, $type$.class, >> long.class); >> 53: static final VarForm TAKE_OFFSET_FORM = new >> VarForm(VarHandleSegmentAs$Type$s.class, MemorySegment.class, $type$.class, >> long.class, long.class); > > what does TAKE mean here? (the old names weren't great either, I realize). I > think it would be better to decide, once and for all, how to refer to these > things, and then use consistent naming throughout. I see we have discussed > using "noStride" vs. "fixedOffset". Since the implementation now uses the > term "constantOffset", let's just call the other "variableOffset" ? Done renaming to `VARIABLE_OFFSET_FORM`. I have also cleaned up some other stale names in the comments. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23720#discussion_r1975640481