At 10:26 PM 12/18/2001 +0100, Marcus Petersson wrote: >Hi, > >I wonder if it's possible to add your own custom opcodes yet. What I have >in mind are ops for about 10 external functions. AFAIK, there are at least >four things that need to be added: > >1. The bytecode format need codes for the new ops. > >2. The assembler format need names for the new ops. > >3. Both 1 and 2 need defined arguments to each op. > >4. The actual code that the new ops execute. FYI, they should call > functions in a shared library.
Hmmm. For the moment throw them into core.ops in a local copy. I'll work up a protocol for adding ops files over the next day or so and document it. >Unfortunately, the docs doesn't seem to reveal where or how to add these >things. Some mails by Gregor give a few hints, but it's not enough. Joys of the undefined, alas. >It's also possible that I need to use an external type or C++ class as >argument (read-only) for some of the ops, which I suppose means I need >to use PMCs. Is this possible yet? I'm not quite sure what you mean. The answer's probably, but do please explain more fully. :) >Btw, wouldn't it be good to set up a parrot-user ML soon? Once the core implementation's actually solid. We've not gotten hashes, subs, packages, exceptions, or threads well-defined yet, not to mention user-loaded opcode libs. >And shouldn't >this list rather be called parrot-dev? I imagine that once implementation >of Perl6 starts, it will otherwise be swamped with Perl-specific issues. We'll burn that bridge when we come to it. Probably in a few months )depending on how the donation thing goes) we'll be in need of it, and then we will. Dan --------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk