[MacRuby-devel] Fibers and Enumerators

Laurent Sansonetti lsansonetti at apple.com
Fri Aug 13 14:19:19 PDT 2010


On Aug 13, 2010, at 2:01 PM, easco wrote:
> On Aug 13, 2010, at 03:46 PM, easco <easco at mac.com> wrote:
> 
>> Unfortunately you are going to have to have someone who has the requisite experience. Since the OS doesn't provide the primitives I thought it might, that person is going to have to understand the Intel 64-bit ABI, (evidently) DWARF exception handling, Mac OS X's implementation of pthreads, and that's before you can start figuring out how to plug it all into the MacRuby interpreter.
>> 
>> As an "application framework level guy" I know that I certainly don't have the requisite skills. I might be able to build them up, but I imagine would probably take longer than anyone interested in MacRuby cares to wait.
> 
> After thinking about it a bit... I guess you wouldn't really care about the Intel ABI so much as some aspect of the LLVM?
> 
> Does LLVM already have some mechanism for supporting multiple "stacks" and switching between them?  (rhetorical question... I imagine I can Google the answer myself).

Yes and no. LLVM has primitives for stack unwinding, but AFAIK they are not (fully) implemented yet (last time I tried, a couple years ago, the unwind instruction wasn't even implemented at all). Also, LLVM isn't fully ABI agnostic at the moment. For ex. it doesn't take care of the function call ABI differences between architectures.

To implement continuations (fibers being just one application of them), we would need to save and restore the execution state manually while making sure of not messing up current exception handlers.

Laurent


More information about the MacRuby-devel mailing list