Re: ASM 8.0 released

Vicente Romero <[email protected]> Thu, 2 Apr 2020 14:06:40 -0400
Newsgroups gmane.comp.java.objectweb.asm
Message-ID <[email protected]>
This is a multi-part message in MIME format...

------------=_1585850967-13477-29
Content-Type: multipart/alternative;
 boundary="------------6BF463C824E0E67CB38E75A4"
Content-Language: en-US

This is a multi-part message in MIME format.
--------------6BF463C824E0E67CB38E75A4
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit

Hi,

Thanks for the fix, I will give it a try later today,

Vicente

On 4/2/20 1:57 PM, Remi Forax wrote:
> Hi Vicente,
> We have just patch the issue with empty records.
>
> Can you clone:
>    [email protected]:asm/asm.git
> build it:
>    ./gradle/gradlew
> and test with the jar inside asm/build/libs ?
>
> regards,
> Rémi
>
> ----- Mail original -----
>> De: "Remi Forax" <[email protected]>
>> À: "Eric Bruneton" <[email protected]>
>> Cc: "Vicente Romero" <[email protected]>, "asm" <[email protected]>
>> Envoyé: Mardi 31 Mars 2020 16:45:40
>> Objet: Re: [asm] ASM 8.0 released
>> ----- Mail original -----
>>> De: "Eric Bruneton" <[email protected]>
>>> À: "Remi Forax" <[email protected]>
>>> Cc: "Vicente Romero" <[email protected]>, "asm" <[email protected]>
>>> Envoyé: Mardi 31 Mars 2020 15:54:36
>>> Objet: Re: [asm] ASM 8.0 released
>>> Should we add an ACC_RECORD pseudo access flag for this (similar to
>>> ACC_INTERFACE)?
>> yes !
>> it's a far better idea than mine (add a RecordVisitor interface which is not a
>> backward compatible change).
>>
>> Rémi
>>
>>> ----- Mail original -----
>>>> De: "Remi Forax" <[email protected]>
>>>> À: "Remi Forax" <[email protected]>
>>>> Cc: "Vicente Romero" <[email protected]>, "Eric Bruneton"
>>>> <[email protected]>, "asm" <[email protected]>
>>>> Envoyé: Mardi 31 Mars 2020 12:12:49
>>>> Objet: Re: [asm] ASM 8.0 released
>>>>
>>>>
>>>>
>>>> But it's a backward incompatible change :(
>>>>
>>>>
>>>>
>>>> Rémi
>>>>
>>>>
>>>> ----- Mail original -----
>>>>
>>>>
>>>>
>>>> De: "Remi Forax" <[email protected]>
>>>> À: "Vicente Romero" <[email protected]>
>>>> Cc: "Eric Bruneton" <[email protected]>, "asm" <[email protected]>
>>>> Envoyé: Mardi 31 Mars 2020 12:02:25
>>>> Objet: Re: [asm] ASM 8.0 released
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> oops,
>>>>
>>>> my bad, will fix that ASAP !
>>>>
>>>>
>>>> Rémi
>>>>
>>>> ----- Mail original -----
>>>>
>>>>
>>>>
>>>> De: "Vicente Romero" <[email protected]>
>>>> À: "Eric Bruneton" <[email protected]>, "asm" <[email protected]>
>>>> Envoyé: Mardi 31 Mars 2020 03:14:35
>>>> Objet: Re: [asm] ASM 8.0 released
>>>>
>>>>
>>>>
>>>> Hi,
>>>>
>>>> Thanks for publishing this version, it is great to see it supporting
>>>> records, yay! I was testing it to include it in JDK 15 and I think I
>>>> found a bug which is related to records with no record components as
>>>> in:
>>>>
>>>> $ cat R.java
>>>> record R() {}
>>>>
>>>> if we compile this record with javac we will see in javap's output an
>>>> empty `Record` attribute but lets say we use the simplest ASM client
>>>> as in:
>>>>
>>>> import java.io.FileInputStream;
>>>> import java.io.FileOutputStream;
>>>>
>>>> import org.objectweb.asm.ClassReader;
>>>> import org.objectweb.asm.ClassWriter;
>>>>
>>>> public class ASMRecordTest {
>>>> public static void main(final String args[]) throws Exception {
>>>> FileInputStream is = new FileInputStream(args[0]);
>>>>
>>>> ClassReader cr = new ClassReader(is);
>>>> ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES);
>>>> cr.accept(cw, 0);
>>>>
>>>> FileOutputStream fos = new FileOutputStream(args[1]);
>>>> fos.write(cw.toByteArray());
>>>> fos.close();
>>>> }
>>>> }
>>>>
>>>> if this program is invoked with arguments: /path/to/R.class
>>>> /path/to/R2.class we will see that R2.class is missing the `Record`
>>>> attribute. The issue in the current code in ASM is that no record
>>>> attribute will be written unless there is at least one record
>>>> component.
>>>>
>>>> Thanks,
>>>> Vicente
>>>>
>>>>
>>>> On 3/28/20 8:07 AM, [email protected] wrote:
>>>>
>>>>
>>>> Release notes:
>>>> - Java 14 support (RecordComponent)
>>>> - bug fixes
>>>>    * 317896: Performance degradation when using dynamic constants as a
>>>>    static parameter to another InDy/ConDy
>>>>
>>>> The ASM team
>>>>
>>>>
>>>>
>>>> --
>>>> You receive this message as a subscriber of the [email protected] mailing
>>>> list.
>>>> To unsubscribe: mailto:[email protected]
>>>> For general help: mailto:[email protected]?subject=help
>>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>>
>>>>
>>>> --
>>>> You receive this message as a subscriber of the [email protected] mailing
>>>> list.
>>>> To unsubscribe: mailto:[email protected]
>>>> For general help: mailto:[email protected]?subject=help
>>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>
>> --
>> You receive this message as a subscriber of the [email protected] mailing list.
>> To unsubscribe: mailto:[email protected]
>> For general help: mailto:[email protected]?subject=help
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>


--------------6BF463C824E0E67CB38E75A4
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi,<br>
    <br>
    Thanks for the fix, I will give it a try later today,<br>
    <br>
    Vicente<br>
    <br>
    <div class="moz-cite-prefix">On 4/2/20 1:57 PM, Remi Forax wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:[email protected]">
      <pre class="moz-quote-pre" wrap="">Hi Vicente,
We have just patch the issue with empty records.

Can you clone: 
  <a class="moz-txt-link-abbreviated" href="mailto:[email protected]:asm/asm.git">[email protected]:asm/asm.git</a>
build it:
  ./gradle/gradlew
and test with the jar inside asm/build/libs ?

regards,
Rémi

----- Mail original -----
</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">De: "Remi Forax" <a class="moz-txt-link-rfc2396E" href="mailto:[email protected]">&lt;[email protected]&gt;</a>
À: "Eric Bruneton" <a class="moz-txt-link-rfc2396E" href="mailto:[email protected]">&lt;[email protected]&gt;</a>
Cc: "Vicente Romero" <a class="moz-txt-link-rfc2396E" href="mailto:[email protected]">&lt;[email protected]&gt;</a>, "asm" <a class="moz-txt-link-rfc2396E" href="mailto:[email protected]">&lt;[email protected]&gt;</a>
Envoyé: Mardi 31 Mars 2020 16:45:40
Objet: Re: [asm] ASM 8.0 released
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">----- Mail original -----
</pre>
        <blockquote type="cite">
          <pre class="moz-quote-pre" wrap="">De: "Eric Bruneton" <a class="moz-txt-link-rfc2396E" href="mailto:[email protected]">&lt;[email protected]&gt;</a>
À: "Remi Forax" <a class="moz-txt-link-rfc2396E" href="mailto:[email protected]">&lt;[email protected]&gt;</a>
Cc: "Vicente Romero" <a class="moz-txt-link-rfc2396E" href="mailto:[email protected]">&lt;[email protected]&gt;</a>, "asm" <a class="moz-txt-link-rfc2396E" href="mailto:[email protected]">&lt;[email protected]&gt;</a>
Envoyé: Mardi 31 Mars 2020 15:54:36
Objet: Re: [asm] ASM 8.0 released
</pre>
        </blockquote>
        <pre class="moz-quote-pre" wrap="">
</pre>
        <blockquote type="cite">
          <pre class="moz-quote-pre" wrap="">Should we add an ACC_RECORD pseudo access flag for this (similar to
ACC_INTERFACE)?
</pre>
        </blockquote>
        <pre class="moz-quote-pre" wrap="">
yes !
it's a far better idea than mine (add a RecordVisitor interface which is not a
backward compatible change).

Rémi

</pre>
        <blockquote type="cite">
          <pre class="moz-quote-pre" wrap="">
----- Mail original -----
</pre>
          <blockquote type="cite">
            <pre class="moz-quote-pre" wrap="">De: "Remi Forax" <a class="moz-txt-link-rfc2396E" href="mailto:[email protected]">&lt;[email protected]&gt;</a>
À: "Remi Forax" <a class="moz-txt-link-rfc2396E" href="mailto:[email protected]">&lt;[email protected]&gt;</a>
Cc: "Vicente Romero" <a class="moz-txt-link-rfc2396E" href="mailto:[email protected]">&lt;[email protected]&gt;</a>, "Eric Bruneton"
<a class="moz-txt-link-rfc2396E" href="mailto:[email protected]">&lt;[email protected]&gt;</a>, "asm" <a class="moz-txt-link-rfc2396E" href="mailto:[email protected]">&lt;[email protected]&gt;</a>
Envoyé: Mardi 31 Mars 2020 12:12:49
Objet: Re: [asm] ASM 8.0 released



But it's a backward incompatible change :(



Rémi


----- Mail original -----



De: "Remi Forax" <a class="moz-txt-link-rfc2396E" href="mailto:[email protected]">&lt;[email protected]&gt;</a>
À: "Vicente Romero" <a class="moz-txt-link-rfc2396E" href="mailto:[email protected]">&lt;[email protected]&gt;</a>
Cc: "Eric Bruneton" <a class="moz-txt-link-rfc2396E" href="mailto:[email protected]">&lt;[email protected]&gt;</a>, "asm" <a class="moz-txt-link-rfc2396E" href="mailto:[email protected]">&lt;[email protected]&gt;</a>
Envoyé: Mardi 31 Mars 2020 12:02:25
Objet: Re: [asm] ASM 8.0 released





oops,

my bad, will fix that ASAP !


Rémi

----- Mail original -----



De: "Vicente Romero" <a class="moz-txt-link-rfc2396E" href="mailto:[email protected]">&lt;[email protected]&gt;</a>
À: "Eric Bruneton" <a class="moz-txt-link-rfc2396E" href="mailto:[email protected]">&lt;[email protected]&gt;</a>, "asm" <a class="moz-txt-link-rfc2396E" href="mailto:[email protected]">&lt;[email protected]&gt;</a>
Envoyé: Mardi 31 Mars 2020 03:14:35
Objet: Re: [asm] ASM 8.0 released



Hi,

Thanks for publishing this version, it is great to see it supporting
records, yay! I was testing it to include it in JDK 15 and I think I
found a bug which is related to records with no record components as
in:

$ cat R.java
record R() {}

if we compile this record with javac we will see in javap's output an
empty `Record` attribute but lets say we use the simplest ASM client
as in:

import java.io.FileInputStream;
import java.io.FileOutputStream;

import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassWriter;

public class ASMRecordTest {
public static void main(final String args[]) throws Exception {
FileInputStream is = new FileInputStream(args[0]);

ClassReader cr = new ClassReader(is);
ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES);
cr.accept(cw, 0);

FileOutputStream fos = new FileOutputStream(args[1]);
fos.write(cw.toByteArray());
fos.close();
}
}

if this program is invoked with arguments: /path/to/R.class
/path/to/R2.class we will see that R2.class is missing the `Record`
attribute. The issue in the current code in ASM is that no record
attribute will be written unless there is at least one record
component.

Thanks,
Vicente


On 3/28/20 8:07 AM, <a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a> wrote:


Release notes:
- Java 14 support (RecordComponent)
- bug fixes
  * 317896: Performance degradation when using dynamic constants as a
  static parameter to another InDy/ConDy

The ASM team



--
You receive this message as a subscriber of the <a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a> mailing
list.
To unsubscribe: <a class="moz-txt-link-freetext" href="mailto:[email protected]">mailto:[email protected]</a>
For general help: <a class="moz-txt-link-freetext" href="mailto:[email protected]?subject=help">mailto:[email protected]?subject=help</a>
OW2 mailing lists service home page: <a class="moz-txt-link-freetext" href="http://www.ow2.org/wws">http://www.ow2.org/wws</a>


--
You receive this message as a subscriber of the <a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a> mailing
list.
To unsubscribe: <a class="moz-txt-link-freetext" href="mailto:[email protected]">mailto:[email protected]</a>
For general help: <a class="moz-txt-link-freetext" href="mailto:[email protected]?subject=help">mailto:[email protected]?subject=help</a>
OW2 mailing lists service home page: <a class="moz-txt-link-freetext" href="http://www.ow2.org/wws">http://www.ow2.org/wws</a>
</pre>
          </blockquote>
        </blockquote>
        <pre class="moz-quote-pre" wrap="">

--
You receive this message as a subscriber of the <a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a> mailing list.
To unsubscribe: <a class="moz-txt-link-freetext" href="mailto:[email protected]">mailto:[email protected]</a>
For general help: <a class="moz-txt-link-freetext" href="mailto:[email protected]?subject=help">mailto:[email protected]?subject=help</a>
OW2 mailing lists service home page: <a class="moz-txt-link-freetext" href="http://www.ow2.org/wws">http://www.ow2.org/wws</a>
</pre>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <pre class="moz-quote-pre" wrap="">
</pre>
      </blockquote>
    </blockquote>
    <br>
  </body>
</html>

--------------6BF463C824E0E67CB38E75A4--

------------=_1585850967-13477-29
Content-Type: text/plain; charset="UTF-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit


-- 
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws

------------=_1585850967-13477-29--