indy-based string-switch proposal
Paul Sandoz
paul.sandoz at oracle.com
Mon Nov 4 22:27:00 UTC 2019
> On Nov 4, 2019, at 12:24 PM, Brian Goetz <brian.goetz at oracle.com> wrote:
>
> Indeed, such a translation improvement is on the roadmap — in fact we want to might all switches other than those over ints to use Indy-based classification. When we extend switch to support patterns, it will force us to revamp switch translation, and this sort of stuff is better done in library code than in generated bytecode.
>
> There is a prototype of the bootstraps for string, long, and others, with some test cases, checked into an amber branch — let me dig this up.
>
> As you discovered, there is an Indy pothole regarding long arg lists, but is slated to be fixed (or may already have been).
>
If you are referring to the 255 BSM method arg limit, that was lifted when constant dynamic was integrated. BSMs are invoked as if by a call to invokeWithArguments.
Still, bundling the trailing BSM args in Object[] feels a little unsatisfying. We a marginal increase in encoding complexity we could represent as a repeating structure using candy.
Paul.
> This is a good direction - and something for which we’d be glad for the help (as you’ll see, my initial patch has been moldering for a while).
>
> Sent from my iPad
More information about the amber-dev
mailing list