On Tue, 7 Nov 2023 14:18:41 GMT, Jan Lahoda wrote:
>> Consider code like:
>>
>> void test(Object o) {
>> switch (o) {
>> case X1 -> {}
>> case X2 -> {}
>> ...(about 100 cases)
>> ```
>>
>> javac will compile the switch into a switch whose selector is an indy
>> invocation
> Consider code like:
>
> void test(Object o) {
> switch (o) {
> case X1 -> {}
> case X2 -> {}
> ...(about 100 cases)
> ```
>
> javac will compile the switch into a switch whose selector is an indy
> invocation to `SwitchBootstraps.typeSwitch`, with static arguments being
> Consider code like:
>
> void test(Object o) {
> switch (o) {
> case X1 -> {}
> case X2 -> {}
> ...(about 100 cases)
> ```
>
> javac will compile the switch into a switch whose selector is an indy
> invocation to `SwitchBootstraps.typeSwitch`, with static arguments being
On Fri, 3 Nov 2023 16:43:30 GMT, Jan Lahoda wrote:
>> Consider code like:
>>
>> void test(Object o) {
>> switch (o) {
>> case X1 -> {}
>> case X2 -> {}
>> ...(about 100 cases)
>> ```
>>
>> javac will compile the switch into a switch whose selector is an indy
>> invocation
On Fri, 3 Nov 2023 15:50:43 GMT, Rémi Forax wrote:
>> Jan Lahoda has updated the pull request incrementally with two additional
>> commits since the last revision:
>>
>> - Some more get->orElseThrow
>> - Reflecting review feedback.
>
>
> Consider code like:
>
> void test(Object o) {
> switch (o) {
> case X1 -> {}
> case X2 -> {}
> ...(about 100 cases)
> ```
>
> javac will compile the switch into a switch whose selector is an indy
> invocation to `SwitchBootstraps.typeSwitch`, with static arguments being
On Fri, 3 Nov 2023 15:24:48 GMT, Jan Lahoda wrote:
>> src/java.base/share/classes/java/lang/runtime/SwitchBootstraps.java line 346:
>>
>>> 344: Class clazz =
>>> label.constantType().resolveConstantDesc(lookup);
>>> 345:
>>> 346: if (value.getClass() !=
On Fri, 3 Nov 2023 15:32:34 GMT, Jan Lahoda wrote:
>> Consider code like:
>>
>> void test(Object o) {
>> switch (o) {
>> case X1 -> {}
>> case X2 -> {}
>> ...(about 100 cases)
>> ```
>>
>> javac will compile the switch into a switch whose selector is an indy
>> invocation
On Fri, 3 Nov 2023 15:29:05 GMT, Jan Lahoda wrote:
> Thanks for all the comments so far - I think I've either reflected them, or
> wrote a comment to each of them. Please let me know if there's something
> else, or if I've forgotten something.
You idea to use an extra array is clever. Using
On Fri, 3 Nov 2023 15:32:34 GMT, Jan Lahoda wrote:
>> Consider code like:
>>
>> void test(Object o) {
>> switch (o) {
>> case X1 -> {}
>> case X2 -> {}
>> ...(about 100 cases)
>> ```
>>
>> javac will compile the switch into a switch whose selector is an indy
>> invocation
On Fri, 3 Nov 2023 15:32:34 GMT, Jan Lahoda wrote:
>> Consider code like:
>>
>> void test(Object o) {
>> switch (o) {
>> case X1 -> {}
>> case X2 -> {}
>> ...(about 100 cases)
>> ```
>>
>> javac will compile the switch into a switch whose selector is an indy
>> invocation
On Fri, 3 Nov 2023 14:19:17 GMT, Rémi Forax wrote:
>> Jan Lahoda has updated the pull request incrementally with two additional
>> commits since the last revision:
>>
>> - Some more get->orElseThrow
>> - Reflecting review feedback.
>
>
> Consider code like:
>
> void test(Object o) {
> switch (o) {
> case X1 -> {}
> case X2 -> {}
> ...(about 100 cases)
> ```
>
> javac will compile the switch into a switch whose selector is an indy
> invocation to `SwitchBootstraps.typeSwitch`, with static arguments being
On Fri, 3 Nov 2023 09:48:15 GMT, Chen Liang wrote:
>> Jan Lahoda has updated the pull request incrementally with two additional
>> commits since the last revision:
>>
>> - Some more get->orElseThrow
>> - Reflecting review feedback.
>
>
On Fri, 3 Nov 2023 08:41:12 GMT, Jan Lahoda wrote:
> Consider code like:
>
> void test(Object o) {
> switch (o) {
> case X1 -> {}
> case X2 -> {}
> ...(about 100 cases)
> ```
>
> javac will compile the switch into a switch whose selector is an indy
> invocation to
On Fri, 3 Nov 2023 08:41:12 GMT, Jan Lahoda wrote:
> Consider code like:
>
> void test(Object o) {
> switch (o) {
> case X1 -> {}
> case X2 -> {}
> ...(about 100 cases)
> ```
>
> javac will compile the switch into a switch whose selector is an indy
> invocation to
On Fri, 3 Nov 2023 08:41:12 GMT, Jan Lahoda wrote:
> Consider code like:
>
> void test(Object o) {
> switch (o) {
> case X1 -> {}
> case X2 -> {}
> ...(about 100 cases)
> ```
>
> javac will compile the switch into a switch whose selector is an indy
> invocation to
On Fri, 3 Nov 2023 08:41:12 GMT, Jan Lahoda wrote:
> Consider code like:
>
> void test(Object o) {
> switch (o) {
> case X1 -> {}
> case X2 -> {}
> ...(about 100 cases)
> ```
>
> javac will compile the switch into a switch whose selector is an indy
> invocation to
On Fri, 3 Nov 2023 08:41:12 GMT, Jan Lahoda wrote:
> Consider code like:
>
> void test(Object o) {
> switch (o) {
> case X1 -> {}
> case X2 -> {}
> ...(about 100 cases)
> ```
>
> javac will compile the switch into a switch whose selector is an indy
> invocation to
On Fri, 3 Nov 2023 08:51:48 GMT, Adam Sotona wrote:
>> Consider code like:
>>
>> void test(Object o) {
>> switch (o) {
>> case X1 -> {}
>> case X2 -> {}
>> ...(about 100 cases)
>> ```
>>
>> javac will compile the switch into a switch whose selector is an indy
>>
On Fri, 3 Nov 2023 08:41:12 GMT, Jan Lahoda wrote:
> Consider code like:
>
> void test(Object o) {
> switch (o) {
> case X1 -> {}
> case X2 -> {}
> ...(about 100 cases)
> ```
>
> javac will compile the switch into a switch whose selector is an indy
> invocation to
Consider code like:
void test(Object o) {
switch (o) {
case X1 -> {}
case X2 -> {}
...(about 100 cases)
```
javac will compile the switch into a switch whose selector is an indy
invocation to `SwitchBootstraps.typeSwitch`, with static arguments being the
types in the
22 matches
Mail list logo