From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 35CDC7EEBF for ; Sat, 8 Aug 2015 05:50:42 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of bobzhang1988@gmail.com) identity=pra; client-ip=209.85.160.172; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="bobzhang1988@gmail.com"; x-sender="bobzhang1988@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of bobzhang1988@gmail.com designates 209.85.160.172 as permitted sender) identity=mailfrom; client-ip=209.85.160.172; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="bobzhang1988@gmail.com"; x-sender="bobzhang1988@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-yk0-f172.google.com) identity=helo; client-ip=209.85.160.172; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="bobzhang1988@gmail.com"; x-sender="postmaster@mail-yk0-f172.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AJAwAIfMVVlKygVdFbgzo1aQaDHqoehBEljUKFeYE0B0wBAQEBAQESAQEBAQcLCwkfMIQ8ER0BGx4DEgkHNwIkAREBBQEiATSHdgEDEg2pWIEuPjGLP4FsgnmLGAoZJw1XhFUBCwEZAQUOkEaCdIFDBZUEB4UBh2CCD5BABYVdEiOBFxeEKCIxgkwBAQE X-IPAS-Result: A0AJAwAIfMVVlKygVdFbgzo1aQaDHqoehBEljUKFeYE0B0wBAQEBAQESAQEBAQcLCwkfMIQ8ER0BGx4DEgkHNwIkAREBBQEiATSHdgEDEg2pWIEuPjGLP4FsgnmLGAoZJw1XhFUBCwEZAQUOkEaCdIFDBZUEB4UBh2CCD5BABYVdEiOBFxeEKCIxgkwBAQE X-IronPort-AV: E=Sophos;i="5.15,633,1432591200"; d="scan'208";a="142302966" Received: from mail-yk0-f172.google.com ([209.85.160.172]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 08 Aug 2015 05:50:41 +0200 Received: by ykoo205 with SMTP id o205so103445969yko.0; Fri, 07 Aug 2015 20:50:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=aQwXO/7RpGL1NDA+Sh+jTOz3sGDYTnz96/lkgTaM0+0=; b=g8WJcFHv3i84xWfC3D3mEXe8yFu9WWKTZaKF3mfVKK0GIUpGNXqxfvEgt0fIrGkNNJ CT5AD7fRbmIHHwH8TeZREdUBWkcZKP7/INxrYPpeTvt/SBbgVQPOzz6MMCqIuohymmWw 222i6zhY4Bq/BlMO5t26d8KCJwn18BIaQTNK9UyDJq0xhqZNK3vbxZPij2jTwH0Q42gN 52RNC4D3lV2eouCBOvoRaGGbAPkOIbei14wF5i8qH44hLPeHnsjl+sljIkl7LfCUmxgu o2nIi5JzcgzYhnjixaseyavYSz5CJo05Nn64OjzVD9M30OFcLhaE+fn+VQASKrIQx0Rg 8O2Q== MIME-Version: 1.0 X-Received: by 10.13.237.1 with SMTP id w1mr11210429ywe.132.1439005839475; Fri, 07 Aug 2015 20:50:39 -0700 (PDT) Received: by 10.37.56.140 with HTTP; Fri, 7 Aug 2015 20:50:39 -0700 (PDT) Date: Fri, 7 Aug 2015 23:50:39 -0400 Message-ID: From: Bob Zhang To: Caml List , Xavier Leroy Content-Type: multipart/alternative; boundary=94eb2c0864a8e44cd2051cc4a702 Subject: [Caml-list] Questions about changing lambda IR --94eb2c0864a8e44cd2051cc4a702 Content-Type: text/plain; charset=UTF-8 Dear caml develpers, I am working on an experimental branch to pass more information from typedtree to lambda to enable ocaml generate user readable javascript code( https://github.com/bobzhang/ocaml/tree/master) (online-demo: http://zhanghongbo.me/js-demo/) Here I get a segfault, after I change const_block: Below is my minimal change: ``` type pointer_info = | NullConstructor of string | NullVariant of string | NAPointer type tag_info = | Constructor of string | Tuple | Variant of string | Record | NA type structured_constant = Const_base of constant | Const_pointer of int * pointer_info | Const_block of int * tag_info * structured_constant list | Const_float_array of string list | Const_immstring of string ``` Note that the enriched info is not used in ``emitcode``, now I get a segfault in make world: ``` ../../boot/ocamlrun ../../ocamlc -nostdlib -I ../../stdlib -c -w +33..39 -warn-error A -bin-annot -g -safe-string -I ../../stdlib -I ../../utils -I ../../typing -I ../../bytecomp -I ../../asmcomp extract_crc.ml ../../boot/ocamlrun ../../ocamlc -nostdlib -I ../../stdlib -o extract_crc dynlink.cma extract_crc.cmo make[3]: *** [extract_crc] Segmentation fault: 11 make[3]: *** Deleting file `extract_crc' make[2]: *** [otherlibraries] Error 2 make[1]: *** [all] Error 2 ``` Any help is appreciated : ) -- Regards -- Hongbo Zhang --94eb2c0864a8e44cd2051cc4a702 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Dear caml develpers,

=C2=A0 = =C2=A0I am working on an experimental branch to pass more information from = typedtree to lambda to enable ocaml generate user readable javascript code(= https://github.co= m/bobzhang/ocaml/tree/master) (online-demo: http://zhanghongbo.me/js-demo/)

=C2=A0 =C2=A0Here I get a segfault, after I change const_block:
=C2=A0 =C2=A0Below is my minimal change:

```
type pointer_info =3D=C2=A0
=C2=A0 | NullConstructor of str= ing
=C2=A0 | NullVariant of string=C2=A0
=C2=A0 | NAPoi= nter=C2=A0

type tag_info =3D=C2=A0
= =C2=A0 | Constructor of string
=C2=A0 | Tuple
=C2=A0 | = Variant of string=C2=A0
=C2=A0 | Record=C2=A0
=C2=A0 | = NA

type structured_constant =3D
= =C2=A0 =C2=A0 Const_base of constant
=C2=A0 | Const_pointer of in= t * pointer_info
=C2=A0 | Const_block of int * tag_info * structu= red_constant list
=C2=A0 | Const_float_array of string list
=
=C2=A0 | Const_immstring of string
```
Note that t= he enriched info is not used in ``emitcode``, now I get a segfault in make = world:

```
../../boot/ocamlrun ../.= ./ocamlc -nostdlib -I ../../stdlib -c -w +33..39 -warn-error A -bin-annot -= g -safe-string -I ../../stdlib -I ../../utils -I ../../typing -I ../../byte= comp -I ../../asmcomp extract_crc.ml<= /div>
../../boot/ocamlrun ../../ocamlc -nostdlib -I ../../stdlib -o ext= ract_crc dynlink.cma extract_crc.cmo
make[3]: *** [extract_crc] S= egmentation fault: 11
make[3]: *** Deleting file `extract_crc'= ;
make[2]: *** [otherlibraries] Error 2
make[1]: *** [a= ll] Error 2
```

Any help is apprec= iated : )

--
Regards=
-- Hongbo Zhang
--94eb2c0864a8e44cd2051cc4a702--