unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: No Itisnt <theseaisinhere@gmail.com>
To: Andy Wingo <wingo@pobox.com>
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: Lua
Date: Thu, 3 Jun 2010 15:36:10 -0500	[thread overview]
Message-ID: <AANLkTikRLcR4ZDFLGKzvaJ_Xp0a5wYaL7PLF4ZwGX0wp@mail.gmail.com> (raw)
In-Reply-To: <m3r5knx6d0.fsf@pobox.com>

[-- Attachment #1: Type: text/plain, Size: 1029 bytes --]

> Not a known bug, no. Can you make a test case?

Yes, attached. It appears to happen when (rnrs control) is used. This
is with the latest master commit.

> No, it will not. The primitive-ref return thing is a hack; the proper
> way to do this (I think?) is to use prompts and aborts, and also enhance
> Guile's compiler to do source-to-source translation of Tree-IL in which
> an intraprocedural abort to a prompt with a fresh tag that cannot escape
> the prompt expression does some kind of CPS on the expression to leave
> the return expression in tail context.
>
> Otherwise we could add `return' to Tree-IL, but that is nasty I think;
> or another hack (nasty, but perhaps expedient). Better to CPS, in the
> long run anyway.

It's not urgent, but Lua does mandate tail call optimization.

On a related note, what would be the best way to benchmark a compiler
optimization? I see "benchmark-guile"; is there a way to easily run it
with an optimization enabled and disabled?  And maybe get some fancy
charts and graphs, too?

[-- Attachment #2: test.scm --]
[-- Type: application/octet-stream, Size: 151 bytes --]

(define-module (module)
  #:use-module ((rnrs control) #:version (6))
  #:use-module (language tree-il))

(make-const #f 2)

(display 'done)
(newline)

  reply	other threads:[~2010-06-03 20:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-22 18:00 Lua No Itisnt
2010-05-22 21:04 ` Lua Ludovic Courtès
2010-06-03  8:32 ` Lua No Itisnt
2010-06-03 19:29   ` Lua Andy Wingo
2010-06-03 20:36     ` No Itisnt [this message]
2010-06-03 22:04       ` Lua Andy Wingo
2010-06-03 22:07       ` Lua Andy Wingo
2010-06-13 21:03 ` Lua No Itisnt
2010-06-14 20:50   ` Lua Andy Wingo
2010-06-15  2:51     ` Lua No Itisnt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTikRLcR4ZDFLGKzvaJ_Xp0a5wYaL7PLF4ZwGX0wp@mail.gmail.com \
    --to=theseaisinhere@gmail.com \
    --cc=guile-devel@gnu.org \
    --cc=wingo@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).