On Tue 09 Sep 2008 10:41, [EMAIL PROTECTED] (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/