On Sat, 3 Nov 2001, Simon Cozens wrote: > On Sat, Nov 03, 2001 at 04:11:23PM -0500, James Mastros wrote: > > No. I say this because I have /no idea/ how they fit into the rest of > > existance. To whit, I don't know how to access them from pasm. I'm not > > nearly good enough to be writing code that I can't test. > > Sombody care to clue me in? > > Look at vtable.ops. However, this probably doesn't help because we don't > currently have an op that creates PMCs. (Dan, how are PMCs going to enter > the system?)
There's going to be a new op. Looks like: new Px, iy Creates a new PMC in register X, of type Y. Allocates a new PMC pointer, so if there's something in X already the pointer's overwritten. (Hopefully it's been saved or it'll be GC'd later) To start, the guaranteed PMC types are: < 0 : Reserved to the interpreter (sync objects and such) 0 : undef 1 : Perl scalar 2 : Perl array 3 : Perl hash 4 : Perl list and the rest'll have to be looked up by name from the big hash 'o loaded PMC types. When we have one. :) Anyone care to take a shot at the PMC versions of all the standard opcodes while we're at it? Dan