RFR: 8350485: C2: factor out common code in Node::grow() and Node::out_grow()

Saranya Natarajan duke at openjdk.org
Mon Mar 10 10:58:26 UTC 2025


Node:grow() and Node::out_grow() are copy-pasted from each other and their core logic could be factored out into a third function or at least cleaned up. Hence,the fix includes a function Node::array_resize() that implements the core logic of Node::grow() and Node::out_grow(). 

 Link to Github action which had no failures :  https://github.com/sarannat/jdk/actions/runs/13677508359

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

Commit messages:
 - JDK-8350485: Code formatting to array_resize
 - JDK-8350485:Code formatting and comments added to resize_array
 - JDK-8350485: Added resize_array

Changes: https://git.openjdk.org/jdk/pull/23928/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23928&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8350485
  Stats: 51 lines in 2 files changed: 16 ins; 17 del; 18 mod
  Patch: https://git.openjdk.org/jdk/pull/23928.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/23928/head:pull/23928

PR: https://git.openjdk.org/jdk/pull/23928


More information about the hotspot-compiler-dev mailing list