lua-users home
lua-l archive

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


> We agree that continuations work best with a bump allocator, which
> requires a moving GC. [...]

There are several other issues with continuations besides frame
collection. For multi-shot continuations, we would need some kind of
stack copies, but plain stack copies will not work in Lua because local
variables live in the stack. (Most Scheme compilers do "assignment
convertion" for assignable variables. This is reasonable for Scheme,
where assignment is the exception, but I guess it would be too expensive
for Lua, where assignment is the norm.)  (Of course, we can also argue
what should be the proper semantics for assignable local variables in
presence of multi-shot; that would only emphasise that things are not
as simple as a better GC...)

-- Roberto