unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* compiled closures status
@ 2007-11-27  6:59 Marco Maggi
  2007-11-27  9:12 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Marco Maggi @ 2007-11-27  6:59 UTC (permalink / raw)
  To: guile-user

Ciao,

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.

--
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


^ permalink raw reply	[flat|nested] 3+ messages in thread
* Re: compiled closures status
@ 2007-11-27 20:37 Marco Maggi
  0 siblings, 0 replies; 3+ messages in thread
From: Marco Maggi @ 2007-11-27 20:37 UTC (permalink / raw)
  To: ludo; +Cc: guile-user

Ciao,

"Ludovic Courtès" wrote:
>
>"Marco Maggi" <marco.maggi-ipsu@poste.it> 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 = proc;
|	proc = 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 <the-archive>/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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-11-27 20:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-27  6:59 compiled closures status Marco Maggi
2007-11-27  9:12 ` Ludovic Courtès
  -- strict thread matches above, loose matches on Subject: below --
2007-11-27 20:37 Marco Maggi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).