On Tue, 21 Apr 2026 17:43:01 GMT, Coleen Phillimore <[email protected]> wrote:
> The valhalla code had refactored object allocation in TemplateTable::_new > because it was called for buffering reads from flat fields. This buffering > code was moved to runtime in JDK-8375719. Rather than refactoring OpenJDK to > match this, I chose to move the object allocation code back to where it was, > with the UseCompactObjectHeaders modifications. > > Tested with tier1-3. > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). Yes, it is to make the merge to mainline easier. I could have gone the other direction (and I have a patch that does that too), but the refactoring only applies to x86 and aarch64 and if we really wanted it to be consistent, we'd do the other cpus. Moving it back makes it consistent. Also, in-place in TemplateTable::_new didn't have as many register passing and stomping in another place, which is a problem with methods in the template interpreter. The other thing I didn't like about how the refactoring ended up was that there was a version in InterpreterMacroAssembler and then another one in MacroAssembler, since the latter did not want to post DTRACE events at one time. So the way it was makes you go looking in too many places. We could refactor it someday. ------------- PR Comment: https://git.openjdk.org/valhalla/pull/2349#issuecomment-4292265220
