<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <font size="4" face="monospace">These look good to me.  (Perhaps
      some of the instruction-specific methods could use the singleton
      instances of the single-bytecode instructions rather than the
      factory?)</font><br>
    <br>
    <div class="moz-cite-prefix">On 1/9/2024 11:35 AM, Adam Sotona
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:DS0PR10MB6847C75A95369761009CAF378C6A2@DS0PR10MB6847.namprd10.prod.outlook.com">
      
      <meta name="Generator" content="Microsoft Word 15 (filtered medium)">
      <style>@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}@font-face
        {font-family:Aptos;
        panose-1:2 11 0 4 2 2 2 2 2 4;}@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:10.0pt;
        font-family:"Calibri",sans-serif;}a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}div.WordSection1
        {page:WordSection1;}</style>
      <div class="WordSection1">
        <p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US" lang="EN-US">Sorry, wrong PR
            <a href="https://github.com/openjdk/jdk/pull/17282" moz-do-not-send="true" class="moz-txt-link-freetext">https://github.com/openjdk/jdk/pull/17282</a>
            in the link below.<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US" lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
        <div id="mail-editor-reference-message-container">
          <div>
            <div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
              <p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;font-family:"Aptos",sans-serif;color:black">From:
                  </span></b><span style="font-size:12.0pt;font-family:"Aptos",sans-serif;color:black">classfile-api-dev
                  <a class="moz-txt-link-rfc2396E" href="mailto:classfile-api-dev-retn@openjdk.org"><classfile-api-dev-retn@openjdk.org></a> on behalf
                  of Adam Sotona <a class="moz-txt-link-rfc2396E" href="mailto:adam.sotona@oracle.com"><adam.sotona@oracle.com></a><br>
                  <b>Date: </b>Tuesday, 9 January 2024 at 17:32<br>
                  <b>To: </b>Brian Goetz
                  <a class="moz-txt-link-rfc2396E" href="mailto:brian.goetz@oracle.com"><brian.goetz@oracle.com></a>,
                  <a class="moz-txt-link-abbreviated" href="mailto:liangchenblue@gmail.com">liangchenblue@gmail.com</a>
                  <a class="moz-txt-link-rfc2396E" href="mailto:liangchenblue@gmail.com"><liangchenblue@gmail.com></a>, classfile-api-dev
                  <a class="moz-txt-link-rfc2396E" href="mailto:classfile-api-dev@openjdk.org"><classfile-api-dev@openjdk.org></a><br>
                  <b>Subject: </b>Re: Revisit j.l.classfile.CodeBuilder
                  API surface<o:p></o:p></span></p>
            </div>
            <div>
              <div>
                <p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US">Hi,</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
                <p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US">I’ve updated the
                    <a href="https://github.com/openjdk/jdk/pull/17306" moz-do-not-send="true">PR</a> draft with removal
                    of </span>
                  <span style="font-size:12.0pt;font-family:Consolas" lang="EN-US">operator</span><span style="font-size:11.0pt" lang="EN-US"> method as
                    obsolete and</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
                <p class="MsoNormal"><span style="font-size:12.0pt;font-family:Consolas">newPrimitiveArray</span><span style="font-size:11.0pt">,
                  </span><span style="font-size:12.0pt;font-family:Consolas">newReferenceArray</span><span style="font-size:11.0pt" lang="EN-US"> and
                  </span><span style="font-size:12.0pt;font-family:Consolas">newMultidimensionalArray</span><span style="font-size:11.0pt" lang="EN-US"> methods as
                    duplicate.</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
                <p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US"> </span><span style="font-size:11.0pt"><o:p></o:p></span></p>
                <p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US">I’ve also extended
                  </span><span style="font-size:12.0pt;font-family:Consolas" lang="EN-US">conversion</span><span style="font-size:11.0pt" lang="EN-US"> method to
                    support the whole matrix (including multi-step
                    conversions, no-op conversions and
                  </span><span style="font-size:12.0pt;font-family:Consolas" lang="EN-US">BooleanType</span><span style="font-size:11.0pt" lang="EN-US"> conversions),
                    see
                    <a href="https://github.com/openjdk/jdk/blob/027374004c9c9bf53a709c98593363043e8b7782/src/java.base/share/classes/java/lang/classfile/CodeBuilder.java#L548" moz-do-not-send="true">
                      CodeBuilder.java#L548</a></span><span style="font-size:11.0pt"><o:p></o:p></span></p>
                <p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US"> </span><span style="font-size:11.0pt"><o:p></o:p></span></p>
                <p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US">Regarding the </span>
                  <span style="font-size:12.0pt;font-family:Consolas" lang="EN-US">allocateLocal</span><span style="font-size:11.0pt" lang="EN-US"> I would
                    slightly prefer to keep it, however
                  </span><span style="font-size:12.0pt;font-family:Consolas">allocateSlot</span><span style="font-size:11.0pt"> or
                  </span><span style="font-size:12.0pt;font-family:Consolas">allocateLocalSlot</span><span style="font-size:11.0pt"> or
                  </span><span style="font-size:12.0pt;font-family:Consolas">reserveLocalSlot</span><span style="font-size:11.0pt" lang="EN-US"> are also
                    fine.</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
                <p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US">Prefix </span><span style="font-size:12.0pt;font-family:Consolas" lang="EN-US">new</span><span style="font-size:11.0pt" lang="EN-US"> would be
                    confusing.</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
                <p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US"> </span><span style="font-size:11.0pt"><o:p></o:p></span></p>
                <p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US">Thanks,</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
                <p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US">Adam</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
                <p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US"> </span><span style="font-size:11.0pt"><o:p></o:p></span></p>
                <p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US"> </span><span style="font-size:11.0pt"><o:p></o:p></span></p>
                <div id="mail-editor-reference-message-container">
                  <div>
                    <p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>