[code-reflection] RFR: Remove Op::traverseOperands

Paul Sandoz psandoz at openjdk.org
Wed Jul 9 17:47:29 UTC 2025


Remove `Op::traverseOperands`. Such traversal methods tend to be limited because it is not possible to control the traversal, and adding such facility will make the API more complex, likely more so that just writing the specific traversal method, since its only a few lines of code.

Evidence in other areas of the code base that traverses up the tree of values indicates this is so, since this method is not used. A better approach would to broaden the functionality of `Value::dependsOn`, adding another method that returns a lazy stream of all dependent values, in order.

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

Commit messages:
 - Remove Op::traverseOperands.

Changes: https://git.openjdk.org/babylon/pull/490/files
  Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=490&range=00
  Stats: 31 lines in 3 files changed: 6 ins; 24 del; 1 mod
  Patch: https://git.openjdk.org/babylon/pull/490.diff
  Fetch: git fetch https://git.openjdk.org/babylon.git pull/490/head:pull/490

PR: https://git.openjdk.org/babylon/pull/490


More information about the babylon-dev mailing list