<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Yeah, I think the observation is not a particularly significant one.  Yes, indy-heavy translation schemes often use more CP slots, which in turn could hasten the “damn, I have to split this class up” problem.  But  its an incremental effect at best.
<div class=""><br class="">
</div>
<div class="">Also, while the “obvious” bootstrap signature is having each enum name stored as a Constant_String_info in the constant pool, which does require one slot per case, that’s not the only encoding.  You could pass a single string of the form “A;B;C”
 and split it at link time; we do something similar with the record bootstraps for equals/hashCode/toString.  <br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Jan 13, 2023, at 11:13 AM, Archie Cobbs <<a href="mailto:archie.cobbs@gmail.com" class="">archie.cobbs@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">
<div dir="ltr" class="">On Thu, Jan 12, 2023 at 7:17 AM Maxim Degtyarev <<a href="mailto:mdegtyarev@gmail.com" class="">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" class="">
<div class="">> <span style="font-family:menlo" class="">The static argument list identifies the enum constants (by string) corresponding to the case numbers.</span></div>
<div dir="auto" class=""><br class="">
</div>
<div dir="auto" class="">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 class=""><br class="">
</div>
<div class="">Just trying to make sure I understand this...<br class="">
</div>
<div class=""><br class="">
</div>
<div class="">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 class=""><br class="">
</div>
<div class="">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 class="">
</div>
<div class=""><br class="">
</div>
<div class="">If that's the case, then doesn't that bug already exist in the compiler in
<span style="font-family:monospace" class="">TransPatterns.handleSwitch()</span>?</div>
<div class=""><br class="">
</div>
<div class="">-Archie<br class="">
</div>
</div>
<div class="gmail_quote"><br class="">
</div>
-- <br class="">
<div dir="ltr" class="gmail_signature">Archie L. Cobbs<br class="">
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>