From: ludo@gnu.org (Ludovic Courtès)
To: guile-devel@gnu.org
Subject: Re: vm branch now uses vm repl by default
Date: Tue, 09 Sep 2008 10:41:41 +0200 [thread overview]
Message-ID: <87y721btiy.fsf@gnu.org> (raw)
In-Reply-To: m38wu195m5.fsf@pobox.com
Hey!
Andy Wingo <wingo@pobox.com> writes:
> I've enabled the VM repl by default on the vm branch. Here's a brief
> annotated tour:
>
> $ ./pre-inst-guile
> Guile Scheme interpreter 0.5 on Guile 1.9.0
> Copyright (C) 2001-2008 Free Software Foundation, Inc.
>
> Enter `,help' for help.
Cool!
> Late-variable-ref looks at a cell in the object vector. If it is a
> symbol, it is resolved relative to the module that was current when the
> program was made. The object cell is then replaced with the resulting
> resolved variable. Here we see that objects 0 and 1 were already
> resolved. Object 2 is just the constant, #:bar.
Aaah, nice! So, previously, there was `variable-ref':
-- Instruction: variable-ref
Dereference the variable object which is on top of the stack and
replace it by the value of the variable it represents.
Now, there's also a vector associated with each closure to store
references to global variables, right? Looks better!
(Hint: the doc is outdated. :-))
> scheme@(guile-user)> ,option interp #t
> scheme@(guile-user)> ,option
> trace #f
> interp #t
>
> Here we tell the repl that, given the option, we prefer to interpret
> rather than compile. Of course, if the current language doesn't support
> compilation, we always interpret.
That means good old `CEVAL ()' is used, right?
When that is the case, one can still use `{eval,debug}-options', right?
It'd be nice if we could find a way to "do something" with the
`current-reader' fluid at compilation time, like detecting top-level
`(fluid-set! current-reader ...)' statements and use that to switch the
compiler's reader (hacky...).
Thanks for the good news!
Ludo'.
next prev parent reply other threads:[~2008-09-09 8:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-09 6:48 vm branch now uses vm repl by default Andy Wingo
2008-09-09 8:27 ` Neil Jerram
2008-09-09 17:59 ` Andy Wingo
2008-09-09 22:27 ` Neil Jerram
2008-09-09 8:41 ` Ludovic Courtès [this message]
2008-09-09 18:13 ` Andy Wingo
2008-09-09 21:01 ` Ludovic Courtès
2008-09-10 19:05 ` Andy Wingo
2008-09-09 22:43 ` Neil Jerram
2008-09-10 18:51 ` Andy Wingo
2008-09-10 21:24 ` Neil Jerram
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=87y721btiy.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guile-devel@gnu.org \
/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).