[COMMIT] PerlArray type

2001-12-17 Thread Jeff G
Note the three-parameter set() ops, specifically. A little lacking in documentation, but they do indeed work. new P0,PerlArray # Initializes a new PerlArray set P0,N0,I0 sets index I0 of array P0 to the number in register N0 get S0,P0,I0 sets S0 to the string in index I0 of P0 Does the current P

Re: [COMMIT] miniperl has been somewhat busy...

2001-12-17 Thread Jason Gloudon
On Mon, Dec 17, 2001 at 10:33:00AM -0500, Dan Sugalski wrote: > >Ok, so set creates an alias. The string set opcode should also create an > >alias for consistency, no ? > > It does. Or it did last I checked... It was changed to make a copy. A high level language implementor wanted Perl language

Re: [COMMIT] miniperl has been somewhat busy...

2001-12-17 Thread jgoff
It's actually named 'clone', and it calls the clone() vtable member of argument $2. The pertinent code reads like: $1->vtable = $2->vtable; $2->vtable->clone(interpreter,$2, $1); I've added clone() vtable entries to the appropriate PMC classes to support this feature. Along with the tweaks mad

Re: [COMMIT] miniperl has been somewhat busy...

2001-12-17 Thread Dan Sugalski
At 10:29 AM 12/17/2001 -0500, Jason Gloudon wrote: >On Mon, Dec 17, 2001 at 09:43:28AM -0500, Dan Sugalski wrote: > > > >Can you clarify what you mean by "deep copy" at least to the pointer > level ? > > > > > >set P0, P1 > > > > > >should invoke P0's "assignment" vtable function (does anyone kno

Re: [COMMIT] miniperl has been somewhat busy...

2001-12-17 Thread Jason Gloudon
On Mon, Dec 17, 2001 at 09:43:28AM -0500, Dan Sugalski wrote: > >Can you clarify what you mean by "deep copy" at least to the pointer level ? > > > >set P0, P1 > > > >should invoke P0's "assignment" vtable function (does anyone know if it > >already > >exists under a different name ?). For the e

Re: [COMMIT] miniperl has been somewhat busy...

2001-12-17 Thread Dan Sugalski
At 09:20 AM 12/17/2001 -0500, Jason Gloudon wrote: >On Sun, Dec 16, 2001 at 11:56:46PM -0500, Jeff G wrote: > > > so it generates code that has commands like 'set P0, P1', so that > > instruction needs to be added. The consensus on that thread seems to be > > that it should perform a deep copy of

Re: [COMMIT] miniperl has been somewhat busy...

2001-12-17 Thread Jason Gloudon
On Sun, Dec 16, 2001 at 11:56:46PM -0500, Jeff G wrote: > so it generates code that has commands like 'set P0, P1', so that > instruction needs to be added. The consensus on that thread seems to be > that it should perform a deep copy of the PMC, at least to the pointer > level. I'll hopefully be