From: Marius Vollmer <mvo@zagadka.ping.de>
Cc: guile-devel@gnu.org
Subject: Re: new-model.text, please comment
Date: 13 Sep 2002 22:22:03 +0200 [thread overview]
Message-ID: <87sn0dr66s.fsf@zagadka.ping.de> (raw)
In-Reply-To: <87elby23fl.fsf@raven.i.defaultvalue.org>
Rob Browning <rlb@defaultvalue.org> writes:
> > The compiler is free to reuse top-level frames for several top-level
> > forms, even when executing a form will change the name/module mapping
> > used in the next. You must explicitely tell the compiler that it must
> > construct a new top-level frame. You can do this with the
> >
> > (:module-barrier) XXX - need better name
> >
> > compiler directive. The directive guarantees that code prior to it is
> > fully executed before top-level frames for forms after it are
> > constructed. The directive must be a top-level form.
>
> Could you provide a bit of elaboration here. More specifically, what
> does "fully executed" mean?
There is no special meaning to "fully" here. I could have just said
"executed".
> For example, does the above mean that given the following code:
>
> (foo ...)
> (do-something-that-changes-the-current-module!)
> (bar ...)
>
> the results would be undefined because the compiler is within its
> rights to presume that do-something *doesn't* change the current
> module unless a without a :module-barrier call like so:
>
> (foo ...)
> (do-something-that-changes-the-current-module!)
> (:module-barrier)
> (bar ...)
>
> This seems to be implied by the later examples of use-modules, etc.,
> but I just wanted to make sure I understood what you were stating.
Yes, this is what I had in mind. Without this :module-barrier
statement, the compiler would have to assume that any call can change
the module setup (which will make a lot optimizations impossible). Or
we would have to have a different kind of module system.
We could have also use declarations to communicate the module barrier
to the compiler. I.e., the variable named
do-something-that-changes-the-current-module! has a declaration that
the compiler understands.
--
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
next prev parent reply other threads:[~2002-09-13 20:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-11 18:05 new-model.text, please comment Marius Vollmer
2002-09-12 22:48 ` Tom Lord
2002-09-14 22:48 ` Marius Vollmer
2002-09-15 0:50 ` Tom Lord
2002-09-15 0:55 ` Tom Lord
2002-09-21 20:27 ` Marius Vollmer
2002-09-12 23:28 ` Rob Browning
2002-09-13 20:22 ` Marius Vollmer [this message]
2002-09-13 20:34 ` Rob Browning
2002-09-13 18:53 ` Neil Jerram
2002-09-13 22:06 ` Rob Browning
2002-09-14 1:15 ` Lynn Winebarger
2002-09-14 22:05 ` Marius Vollmer
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=87sn0dr66s.fsf@zagadka.ping.de \
--to=mvo@zagadka.ping.de \
--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).