[code-reflection] Integrated: Hat lanewise binary op extraction experiment

Gary Frost gfrost at openjdk.org
Tue Jan 13 16:21:11 UTC 2026


On Tue, 13 Jan 2026 16:11:43 GMT, Gary Frost <gfrost at openjdk.org> wrote:

> Demonstrate that we can leverage the codemodels of lanewise vector style operations to determine the core binary op used in each lane.
> 
> So given
> 
> @Reflect
>  static XY whoKnows(XY lhs, XY rhs) { #1
>      return new XY(lhs.x * rhs.x, lhs.y * rhs.y);
>   }
>   @Reflect
>    public XY whoKnows(XY xy) { // #2
>      return whoKnows(this, xy);
>    }
> ``` 
> If we find a fluent method which takes a type and returns the type (whoKnows(XY xy)) we can determine the binary op it represents by  'recursivley' traversing the code models from an entrypoint

This pull request has now been integrated.

Changeset: cc231421
Author:    Gary Frost <gfrost at openjdk.org>
URL:       https://git.openjdk.org/babylon/commit/cc23142194fdd1f67134ec7ae1c56c3633586ac6
Stats:     231 lines in 3 files changed: 226 ins; 0 del; 5 mod

Hat lanewise binary op extraction experiment

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

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


More information about the babylon-dev mailing list