<div dir="ltr"><div dir="ltr">On Thu, Jan 12, 2023 at 7:17 AM Maxim Degtyarev <<a href="mailto:mdegtyarev@gmail.com">mdegtyarev@gmail.com</a>> wrote:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div>> <span style="font-family:menlo">The static argument list identifies the enum constants (by string) corresponding to the case numbers.</span></div><div dir="auto"><br></div><div dir="auto">This will decrease theoretical maximum of switch blocks in enum switch statement due to constant pool size limitations. So it may affect some code with huge switches over enum.</div></div></blockquote><div><br></div><div>Just trying to make sure I understand this...<br></div><div><br></div><div>The list of identifiers that gets passed to SwitchBootstraps.enumSwitch() is stored in an array, and the array is built from individual strings pulled from the constant pool.</div><div><br></div><div>So is this what you're saying: the number of switch cases is limited by how many entries the constant pool can hold? (I think that's 2^16 - 1)<br></div><div><br></div><div>If that's the case, then doesn't that bug already exist in the compiler in <span style="font-family:monospace">TransPatterns.handleSwitch()</span>?</div><div><br></div><div>-Archie<br></div></div><div class="gmail_quote"><br></div>-- <br><div dir="ltr" class="gmail_signature">Archie L. Cobbs<br></div></div>