On Thu, 16 Oct 2003, Robert Spier wrote: > > The goals are to assign permanent numbers to the opcodes. What the > > numbers are is generally irrelevant, but they must be constant across > > all systems for the lifetime of parrot. > > At first glance, gut reaction, that seems "really hard"(tm) and > "really limiting"(tm)...
Luckily, on second glance, it turns out to be neither. :) While new ops get added, old ones rarely, if ever, get removed. Perl 5's set has been stable, as has Python's, the JVM, the x86, Alpha, SPARC, and POWER's... > since there's going to be a combination of dynamic oplibs that are > going to have to be dynamically numbered anyway. (right?) Yes and no. Dynamic ops will go into slots, put in by name, with their number fixed at compile-time. We'd prefer to do this as little as possible for startup speed reasons, as it does slow down instantiating an interpreter. > So why not treat the core oplib as dynamic? (With the exception of > the handful that need to be fixed, like end.) Speed and complexity mainly. There's no win from the flexibility. Dan