From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Marco Maggi" Newsgroups: gmane.lisp.guile.user Subject: Re: compiled closures status Date: Tue, 27 Nov 2007 21:37:36 +0100 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1196195953 4735 80.91.229.12 (27 Nov 2007 20:39:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 27 Nov 2007 20:39:13 +0000 (UTC) Cc: guile-user To: "ludo" Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Nov 27 21:39:11 2007 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Ix7D4-0004LI-Px for guile-user@m.gmane.org; Tue, 27 Nov 2007 21:39:11 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ix7Cp-0004cu-Ia for guile-user@m.gmane.org; Tue, 27 Nov 2007 15:38:55 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ix7Cl-0004cL-4E for guile-user@gnu.org; Tue, 27 Nov 2007 15:38:51 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ix7Cj-0004c0-G3 for guile-user@gnu.org; Tue, 27 Nov 2007 15:38:50 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ix7Cj-0004bw-8D for guile-user@gnu.org; Tue, 27 Nov 2007 15:38:49 -0500 Original-Received: from relay-pt1.poste.it ([62.241.4.164]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ix7Ba-0003Gw-DF; Tue, 27 Nov 2007 15:38:45 -0500 Original-Received: from poste.it (192.168.144.185) by relay-pt1.poste.it (7.3.122) (authenticated as marco.maggi-ipsu@poste.it) id 474B6C6500006468; Tue, 27 Nov 2007 21:37:36 +0100 X-Sensitivity: 3 X-XaM3-API-Version: 4.3 (R1) (B3pl19) X-SenderIP: 81.211.213.150 X-detected-kernel: by monty-python.gnu.org: Solaris 9 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:6301 Archived-At: Ciao, "Ludovic Court=E8s" wrote: > >"Marco Maggi" writes: > >> I have written a simple extension to test the >> compiled closures feature, and it seems to work. >> I wonder if it can be documented (and in this case >> I can contribute a Texinfo node) or there are plans >> to change the API. > >You're referring to `scm_makcclo ()' and the likes? Yes. >The difference with `scm_closure ()', AIUI, is that a cclo's >environment is a simple C array instead of an alist. Mh. The "env" parameter is a simple alist? I will try to find what is the "code" one.... but I doubt that it is a gsubr. The compiled closure is the pair "scm_t_bits" array/gsubr. >However, I'm under the impression that code in `eval.c' >doesn't know how to deal with a cclo's environment >(e.g., there is no occurrence of `SCM_CCLO_BASE ()'). In Guile 1.8.3 at line 4139 of "eval.c", | case scm_tc7_cclo: | arg1 =3D proc; | proc =3D SCM_CCLO_SUBR (proc); which means that the compiled procedure is invoked with the closure itself as first argument. >So, what makes you think it works? :-) I tried it: $ tla register-archive http://arch.gna.org/gee/gee-2007 $ tla get /gee-examples--devel--0.4 :-) -- Marco Maggi "Now feel the funk blast!" Rage Against the Machine - "Calm like a bomb" _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user