Front page | perl.perl6.internals |
Postings from December 2001
How to add new ops?
Thread Next
From:
Marcus Petersson
Date:
December 18, 2001 13:29
Subject:
How to add new ops?
Message ID:
Pine.LNX.4.21.0112181556020.542-100000@alkur-sassnitz
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.
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.
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 can explain the matter more thoroughly if needed. :-)
Btw, wouldn't it be good to set up a parrot-user ML soon? 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.
Personally, I have no interest in Perl, quite little in the actual Parrot
implementation, but very much in using it for other purposes.
Marcus
------------------------------------
If you find that life spits on you
calm down and pretend it's raining
Thread Next
-
How to add new ops?
by Marcus Petersson