guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

inderected rtl instructions


From: Stefan Israelsson Tampe
Subject: inderected rtl instructions
Date: Sun, 14 Apr 2013 10:42:59 +0200

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]