From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 934CA7EEBF for ; Sat, 8 Aug 2015 13:26:30 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of bobzhang1988@gmail.com) identity=pra; client-ip=209.85.160.170; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="bobzhang1988@gmail.com"; x-sender="bobzhang1988@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of bobzhang1988@gmail.com designates 209.85.160.170 as permitted sender) identity=mailfrom; client-ip=209.85.160.170; receiver=mail2-smtp-roc.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 (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-yk0-f170.google.com) identity=helo; client-ip=209.85.160.170; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="bobzhang1988@gmail.com"; x-sender="postmaster@mail-yk0-f170.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0D2AQCX5sVVlKqgVdFbg29aDwaDHqofkXmFeQKBIwdMAQEBAQEBEgEBAQEHCwsJHzCEIwEBAQMBEhEdARsdAQMBCwYFCw0qAgIhAQERAQUBHAYTIod2AQMKCA2pWoEuPjGLP4FsgnmLEwoZJw1XhFUBAQEBAQEEAQEBAQEBAQEUAQUOi0OCT4I2BAeCaYFDBYcahmaHBAeFAoV1gWyBSUaQOwqDQ4IaEiOBFxeCHRyBbyIxgkwBAQE X-IPAS-Result: A0D2AQCX5sVVlKqgVdFbg29aDwaDHqofkXmFeQKBIwdMAQEBAQEBEgEBAQEHCwsJHzCEIwEBAQMBEhEdARsdAQMBCwYFCw0qAgIhAQERAQUBHAYTIod2AQMKCA2pWoEuPjGLP4FsgnmLEwoZJw1XhFUBAQEBAQEEAQEBAQEBAQEUAQUOi0OCT4I2BAeCaYFDBYcahmaHBAeFAoV1gWyBSUaQOwqDQ4IaEiOBFxeCHRyBbyIxgkwBAQE X-IronPort-AV: E=Sophos;i="5.15,633,1432591200"; d="scan'208";a="173032850" Received: from mail-yk0-f170.google.com ([209.85.160.170]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 08 Aug 2015 13:25:27 +0200 Received: by ykoo205 with SMTP id o205so107410019yko.0; Sat, 08 Aug 2015 04:25:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=7Cavo/uptwX1ReHKUiAOyErRHelNToyFshibfQjANDs=; b=bGxtjP+pM63ETTqe7EK3En+4Ij7Z59yspTSkCfo5W86ktq1DAQ0gBuV8/nplpiluwH NKaWbQY738le79LU17m74ocBFxRRQD6uvwvqb8wYSdviNogZOXKZaW2Cj+G2ZC8eR/cM XEEL3kAxUgsFlHJHsy8K98cHUAYQZhWZkS1E9nyFJ5tDitMmTMeMa+wJLmqCBfabUfZD tX5FfD14C4HbE4jrraRIIQJookx2XFH3/QrdYimemwb9zRQ7IPTN17fDWfoyomUv+0wo eiMrkztU95+qLOLWJSzSL4YzQ1mPwc8chVCdSPe3nyMqMiSiNdf263M7DYux80L8PA73 mLKQ== MIME-Version: 1.0 X-Received: by 10.129.133.199 with SMTP id v190mr12471191ywf.38.1439033126280; Sat, 08 Aug 2015 04:25:26 -0700 (PDT) Received: by 10.37.56.140 with HTTP; Sat, 8 Aug 2015 04:25:26 -0700 (PDT) In-Reply-To: References: Date: Sat, 8 Aug 2015 07:25:26 -0400 Message-ID: From: Bob Zhang To: Gabriel Scherer Cc: Caml List , Xavier Leroy Content-Type: multipart/alternative; boundary=001a114f113e4fe469051ccb0260 Subject: Re: [Caml-list] Questions about changing lambda IR --001a114f113e4fe469051ccb0260 Content-Type: text/plain; charset=UTF-8 It does not work for me. Since it fails to compile, I pushed it to another branch https://github.com/bobzhang/ocaml/tree/fails (sorry for the misinformation) I did `git clean -fxd` and try configure, make world, it failed in the same place. Thank you for your time! On Sat, Aug 8, 2015 at 3:37 AM, Gabriel Scherer wrote: > You need to run "make bootstrap" to avoid having part of the definition > compiled against the stale definition of lambda.cmi. (I just checked that > it works on your change: after a bootrsap, "make world", "make opt", "make > opt.opt" work.) > > On Sat, Aug 8, 2015 at 5:50 AM, Bob Zhang wrote: > >> >> 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 >> > > -- Regards -- Hongbo Zhang --001a114f113e4fe469051ccb0260 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
It does not work for me. Since it fails to compile, I push= ed it to another branch=C2=A0https://github.com/bobzhang/ocaml/tree/fails (sorry for the = misinformation)

I did `git clean -fxd` and try configure= , make world, it failed in the same place.
Thank you for your time!

On Sat, Au= g 8, 2015 at 3:37 AM, Gabriel Scherer <gabriel.scherer@gmail.com> wrote:
You= need to run "make bootstrap" to avoid having part of the definit= ion compiled against the stale definition of lambda.cmi. (I just checked th= at it works on your change: after a bootrsap, "make world", "= ;make opt", "make opt.opt" work.)

On Sat, Aug 8, 2015 at 5:50 AM, Bob Zhang <bobzhang1988@gmail.c= om> wrote:

Dear caml develpers,

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

=C2=A0 =C2=A0Here I get a segfault, after I change co= nst_block:
=C2=A0 =C2=A0Below is my minimal change:
```
type pointer_info =3D=C2=A0
=C2=A0 | Nu= llConstructor of string
=C2=A0 | NullVariant of string=C2=A0
=C2=A0 | NAPointer=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_const= ant =3D
=C2=A0 =C2=A0 Const_base of constant
=C2=A0 | C= onst_pointer of int * pointer_info
=C2=A0 | Const_block of int * = tag_info * structured_constant list
=C2=A0 | Const_float_array of= string list
=C2=A0 | 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-er= ror A -bin-annot -g -safe-string -I ../../stdlib -I ../../utils -I ../../ty= ping -I ../../bytecomp -I ../../asmcomp extract_crc.ml
../../boot/ocamlrun ../../oca= mlc -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]: *** [otherlibrarie= s] Error 2
make[1]: *** [all] Error 2
```

Any help is appreciated : )

--
Regards
-- Hongbo Zhang




--
=
Regards
-- Hongbo Zhang
--001a114f113e4fe469051ccb0260--