Dan Sugalski <[EMAIL PROTECTED]> wrote:At 9:51 AM +0200 6/2/04, Leopold Toetsch wrote:- don't load extensions at compile time, so that dynamic PMCs have to be created with
$I0 = find_type "Foo" $P0 = new $I0
Option two here would be the right one.
For dynamic PMC classes and NCI yes. *But* what about dynamic opcode libs? The PASM/PIR compilers have to load in the lib to be able to emit the opcode number.
Well... not necessarily. The original scheme was for the opcode loading code to specify what numbers the loaded opcodes would get for the compilation unit in question.
Should we use a different opcode for the latter?
I think we need a different scheme for loadable opcode libs, yeah. We need more metainformation, either at load or at compile time, possibly both. I think, though, that the compile time information can be specified completely in the PIR code. Whether we want to or not is a separate issue, of course, but I think we're going to want to do so.
Might look something like:
.library foo.ops { .op acosh .op asech .op atanh }
or just go with a .library/.end pair. I don't much care, it's not that big a deal. It's enough to give the pir compiler what it needs to map op names to op numbers, and then we need to have a metadata section in the bytecode file to tell the loader what it needs to do to build the opcode tables when the bytecode's loaded in and the sub pmcs are instantiated.
--
Dan
--------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk