[code-reflection] RFR: Support match all pattern

Paul Sandoz psandoz at openjdk.org
Thu Sep 12 16:50:17 UTC 2024


On Thu, 12 Sep 2024 07:52:28 GMT, Mourad Abbay <mabbay at openjdk.org> wrote:

> Support match all pattern.
> This PR is based on [227](https://github.com/openjdk/babylon/pull/227).

I think you should model as an explicit op, `match.all`, that encapsulates the type (in effect the upper bound). If you reuse `pattern.type` op then a type test (instance of check) will be generated when lowering. Instead, when lowering a `match.all` we can just add the target value to the list of bindings and return the current block.

When this PR is completed we can step back and decide how to manage bindings to unnamed variables.

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

PR Review: https://git.openjdk.org/babylon/pull/230#pullrequestreview-2300890382


More information about the babylon-dev mailing list