Definitely interesting and I follow your logic. Hopefully it leads to something new
w
wasyl
06/17/2020, 8:32 AM
Do I understand correctly that the compiler would generate a shared
ContinuationImpl
for each combination of fields that right now the anonymous class has, eg.
Copy code
// $FF: synthetic field
Object result;
int label;
Object L$0;
?
e
elizarov
06/17/2020, 9:23 AM
Great idea, very hard to implement in practice.
elizarov
06/17/2020, 9:24 AM
Each coroutine impl also has a call to the underlying method, which has to be different for each instance.
l
louiscad
06/17/2020, 9:38 AM
Yes, I was thinking about a switch for these, taking the needed parameters in the needed order.
That implies the "continuation implementation signature" orders the "keys", but that the needed order is kept right for calls to the underlying method.
Should I edit the YouTrack ticket to make this more clear?
louiscad
06/17/2020, 9:40 AM
@wasyl I didn't quite understand your example, but I think you got it, it'd share the