Re: ASM 8.0 released

Remi Forax <[email protected]> Tue, 31 Mar 2020 12:02:25 +0200 (CEST)
Newsgroups gmane.comp.java.objectweb.asm
Message-ID <[email protected]>
This is a multi-part message in MIME format...

------------=_1585649328-24931-5
Content-Type: multipart/alternative; 
	boundary="=_4a205f91-8a84-43b1-8fac-57e9a497d29e"

--=_4a205f91-8a84-43b1-8fac-57e9a497d29e
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

oops,=20
my bad, will fix that ASAP !=20

R=C3=A9mi=20

> De: "Vicente Romero" <[email protected]>
> =C3=80: "Eric Bruneton" <[email protected]>, "asm" <[email protected]>
> Envoy=C3=A9: 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 reco=
rds,
> yay! I was testing it to include it in JDK 15 and I think I found a bug w=
hich
> 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 emp=
ty
> `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 =3D new FileInputStream(args[0]);

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

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

> if this program is invoked with arguments: /path/to/R.class /path/to/R2.c=
lass 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 th=
ere is
> at least one record component.

> Thanks,
> Vicente

> On 3/28/20 8:07 AM, [ mailto:[email protected] | [email protected] ] wrot=
e:

>> Release notes:
>> - Java 14 support (RecordComponent)
>> - bug fixes
>>  * 317896: Performance degradation when using dynamic constants as a sta=
tic
>>   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=3Dhelp
> OW2 mailing lists service home page: http://www.ow2.org/wws

--=_4a205f91-8a84-43b1-8fac-57e9a497d29e
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

<html><body><div style=3D"font-family: arial, helvetica, sans-serif; font-s=
ize: 12pt; color: #000000"><div>oops,<br></div><div>my bad, will fix that A=
SAP !<br data-mce-bogus=3D"1"></div><div><br data-mce-bogus=3D"1"></div><di=
v>R=C3=A9mi<br data-mce-bogus=3D"1"></div><div><br></div><hr id=3D"zwchr" d=
ata-marker=3D"__DIVIDER__"><div data-marker=3D"__HEADERS__"><blockquote sty=
le=3D"border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:=
#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:=
Helvetica,Arial,sans-serif;font-size:12pt;"><b>De: </b>"Vicente Romero" &lt=
;[email protected]&gt;<br><b>=C3=80: </b>"Eric Bruneton" &lt;ebrune=
[email protected]&gt;, "asm" &lt;[email protected]&gt;<br><b>Envoy=C3=A9: </b>Mardi 31 =
Mars 2020 03:14:35<br><b>Objet: </b>Re: [asm] ASM 8.0 released<br></blockqu=
ote></div><div data-marker=3D"__QUOTED_TEXT__"><blockquote style=3D"border-=
left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-wei=
ght:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Ari=
al,sans-serif;font-size:12pt;">Hi,<br>
    <br>
    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:<br>
    <br>
    $ cat R.java<br>
    record R() {}<br>
    <br>
    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:<br>
    <br>
    import java.io.FileInputStream;<br>
    import java.io.FileOutputStream;<br>
    <br>
    import org.objectweb.asm.ClassReader;<br>
    import org.objectweb.asm.ClassWriter;<br>
    <br>
    public class ASMRecordTest {<br>
    &nbsp;&nbsp;&nbsp; public static void main(final String args[]) throws =
Exception {<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FileInputStream is =3D new F=
ileInputStream(args[0]);<br>
    <br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ClassReader cr =3D new Class=
Reader(is);<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ClassWriter cw =3D new
    ClassWriter(ClassWriter.COMPUTE_FRAMES);<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cr.accept(cw, 0);<br>
    <br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FileOutputStream fos =3D new=
 FileOutputStream(args[1]);<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fos.write(cw.toByteArray());=
<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fos.close();<br>
    &nbsp;&nbsp;&nbsp; }<br>
    }<br>
    <br>
    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.<br>
    <br>
    Thanks,<br>
    Vicente<br>
    <br>
    <div class=3D"moz-cite-prefix">On 3/28/20 8:07 AM, <a class=3D"moz-txt-=
link-abbreviated" href=3D"mailto:[email protected]" target=3D"_blank">ebrun=
[email protected]</a>
      wrote:<br>
    </div>
    <blockquote cite=3D"mid:1661375377.158900451.1585397255081.JavaMail.roo=
[email protected]">
      <pre class=3D"moz-quote-pre">Release notes:
- Java 14 support (RecordComponent)
- bug fixes
  * 317896: Performance degradation when using dynamic constants as a stati=
c parameter to another InDy/ConDy

The ASM team
</pre>
      <br>
      <fieldset class=3D"mimeAttachmentHeader"></fieldset>
      <pre class=3D"moz-quote-pre"></pre>
    </blockquote>
    <br>
=20=20

<br><br>-- <br>You receive this message as a subscriber of the [email protected] =
mailing list.<br>To unsubscribe: mailto:[email protected]<br>For gene=
ral help: mailto:[email protected]?subject=3Dhelp<br>OW2 mailing lists service =
home page: http://www.ow2.org/wws<br></blockquote></div></div></body></html=
>=

--=_4a205f91-8a84-43b1-8fac-57e9a497d29e--

------------=_1585649328-24931-5
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

------------=_1585649328-24931-5--