[armedbear-devel] Idea for new FASL format: smaller, faster

Erik Huelsmann ehuels at gmail.com
Thu Jan 26 08:20:43 UTC 2012


On Wed, Jan 25, 2012 at 11:05 PM, Erik Huelsmann <ehuels at gmail.com> wrote:
> Thinking some more about my own proposal:
>

> The closure above can't be entered through any function which requires
> a context record to exist on the first call. However, there are cases
> (even in our own code base) where there are no entry points without a
> context record:
>
> (let (something)
>  (defun foo ()
>     (setf something 'a))
>
>  (defun goo ()
>     something))
>
> (defun moo ()
>   (goo))
>
>
> Compiling a direct call from moo to goo can't be a plain static call -
> it'll need the context record created at function definition time.
> Anybody who has any ideas how to solve this case?

Following up on myself: the call from MOO to GOO will go through the
symbol function because the DEFUNs for FOO and GOO aren't toplevel
forms, which means the functions don't get recorded as 'defined in the
same file'. When we set up the FOO and GOO functions correctly,
they'll have associated context records.

Due to the way our compiler works, MOO *is* registered as a 'function
defined in the same file' which means that if MOO were defined before
FOO and GOO and either would call MOO, that call would simply be a
static function call. (Still get it? :-)

Concluding: I can simply go forward in the direction that I described
in my orginal mail; the "DEFUNs inside closure" issue raised above
will 'solve itself'.

Bye,

Erik.




More information about the armedbear-devel mailing list