[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: scm_local_eval is not available in Guile V2.
From: |
David Kastrup |
Subject: |
Re: scm_local_eval is not available in Guile V2. |
Date: |
Wed, 16 Nov 2011 16:07:10 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) |
Ian Hulin <address@hidden> writes:
> Hi David,
>
>> <URL:http://code.google.com/p/lilypond/issues/detail?id=2043>
>>
>> Accompanying patch is relative to staging currently. This should
>> get you going again. I don't particularly like this approach, and
>> it is more complex and error-prone, and likely slower than the
>> original version. But without access to procedure-environments, I
>> see no simpler way out here.
>>
> Thank you very much for getting on to this so quickly. I started
> having a look at the Guile V1.8.7 code to see if we could "borrow" it
> to put in our code base, but it looks like they've done some janitor
> work with the code in addition to changing the name of the underlying
> internal routine from scm-i-eval to eval.
>
> However, it may be work asking if the Guile team would be up to
> supplying an unsupported (from their end) version which we could
> stitch in to our code-base.
Well, getting a procedure-environment would appear to be incompatible
with optimized compilation of the function containing #{ ... #}. It
would have to be executed in a mostly interpreted environment. But
since #{ ... #} itself calls the lexer and parser, this would be a
non-issue except when the function does extensive loops before executing
a single #{ ... #} statement.
> Andy and Ludo were quite helpful with providing us with a back-ported
> module-export-all! when ly_make_module was in danger of breaking.
>
> Would it be worth asking on guile-user about a private copy of a
> ported scm_local_eval?
I think it would likely be incompatible with the compilation model of
Guile V2. scm_local_eval alone does not do the trick: you also need
something to feed it with, namely the result of calling
procedure-environment. I don't think you can get _that_ without having
a whole interpreter built around it. It is not a general Scheme feature
but was specific to Guile, and I doubt it will come back.
--
David Kastrup