unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* inderected rtl instructions
@ 2013-04-14  8:42 Stefan Israelsson Tampe
  0 siblings, 0 replies; only message in thread
From: Stefan Israelsson Tampe @ 2013-04-14  8:42 UTC (permalink / raw)
  To: guile-devel

Hi all,

In order to support efficient compilation of generators and
accumulators I think that we
need to add/change the current rtl format with.

1. named gotos
2. Add the possibility that in a call be able to name a stack object.

Rationale:
1) If a generator is inlined in a function we must be able to jump back to
the code which issued the abort-to-prompt, if there are multiplies of them
it would be really nice to store the abort adress in a local variable and use a
named goto. Else rtl is well suited to compile inlined generators and
accumulators effeciently.

To note is that the ability to evaluate a function call at a specified
position is the key for
the rtl power and the reason you cannot do this trick in current guile-vm.

But

2) In the case where we have generator that is a function object e.g.
not inline it's possible
to try to let it have it's own stack memory and instruction pointer
and use that as a generator.
This can work if it was not for the fact that.
a) function calls uses an unspecified amount of stack.
b) The debug infrastructure cannot handle this complexity.
c) plain old continuations need to be able to handle these generators
in a sane way.
d) the dynwind, fluids etc. stack has to be managed sanely in some way

So this looks like a much more complex problem, but from the rtl
perspective one would
like to when calling a function be able to specify which memory
position we would like to
put that call on. E.g. currently we specify n in fp[n], but we might
want to specify fp as well
in the call.

Anyway, RTL is exciting in that can deliver good performant generators
and acumulators with the current scheme semantics e.g. as wingo
pointed out in his blog, we probably don't need to dumb down delimited
continuations.

WDYT



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-04-14  8:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-14  8:42 inderected rtl instructions Stefan Israelsson Tampe

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).