From: Andy Wingo <wingo@pobox.com>
To: ludo@gnu.org (Ludovic Courtès)
Cc: guile-devel@gnu.org
Subject: Re: vm branch now uses vm repl by default
Date: Tue, 09 Sep 2008 20:13:44 +0200 [thread overview]
Message-ID: <m3ljy16vc7.fsf@pobox.com> (raw)
In-Reply-To: <87y721btiy.fsf@gnu.org> ("Ludovic Courtès"'s message of "Tue, 09 Sep 2008 10:41:41 +0200")
On Tue 09 Sep 2008 10:41, ludo@gnu.org (Ludovic Courtès) writes:
> So, previously, there was `variable-ref':
There still is. It is used when a variable is bound immediately, when it
is pushed on the stack by a link-now instruction.
scheme@(guile-user)> ,c (define x a)
Disassembly of #<objcode b7feb6d0>:
nlocs = 0 nexts = 0
0 (load-symbol "a") ;; a
3 (link-now)
4 (variable-ref)
5 (define "x")
8 (variable-set)
9 (void)
10 (return)
> Now, there's also a vector associated with each closure to store
> references to global variables, right? Looks better!
That's always been the case IIRC, only before it used to push and pop a
bit more -- instead of
(late-variable-ref 0)
it would be
(object-ref 0)
(variable-ref)
where the object was instantiated by a load-symbol / link-now pair. But
that's not how Guile's toplevel lookups occur, so I added the new
behavior, which has the added benefit of not pushing and popping so
much.
> (Hint: the doc is outdated. :-))
It's still correct, just not complete :-) I'll get on it at some point,
probably folding into Guile's docs somehow.
>> scheme@(guile-user)> ,option interp #t
>
> That means good old `CEVAL ()' is used, right?
Yep, whatever (language-evaluator (repl-language repl)) does -- which
for `scheme' is `eval'.
http://git.savannah.gnu.org/gitweb/?p=guile.git;a=commitdiff;h=02ed0d3df2607c5d78fbc38cbb82a65df1bc7080
> When that is the case, one can still use `{eval,debug}-options', right?
Yep
> 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...).
Perhaps, there is already a repl-reader fluid for readline's benefit.
Note also that languages have readers as well, so that e.g. elisp can
read differently from scheme.
Andy
--
http://wingolog.org/
next prev parent reply other threads:[~2008-09-09 18:13 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
2008-09-09 18:13 ` Andy Wingo [this message]
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=m3ljy16vc7.fsf@pobox.com \
--to=wingo@pobox.com \
--cc=guile-devel@gnu.org \
--cc=ludo@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).