Re: PMCs and how the opcode functions will work

2001-11-16 Thread Dave Mitchell
Simon Cozens [EMAIL PROTECTED] wrote: Shouldn't the above be more like: P1-vtable-vtable_funcs[VTABLE_ADD + P2-vtable-num_type](i, P0, P1, P2); I'm probably overlooking something here, but why the double indirection? Shouldn't that just be P1-vtable.vtable_funcs[ ?

Re: PMCs and how the opcode functions will work

2001-11-16 Thread Jason Gloudon
On Thu, Nov 15, 2001 at 08:18:32PM +, Simon Cozens wrote: I'm under the impression that the signature of the add method should be void foo (interpreter, destination, left, right) Shouldn't the above be more like: P1-vtable-vtable_funcs[VTABLE_ADD + P2-vtable-num_type](i,

Re: PMCs and how the opcode functions will work

2001-11-15 Thread Simon Cozens
On Thu, Oct 18, 2001 at 12:30:29PM +0100, Simon Cozens wrote: On Mon, Oct 08, 2001 at 06:36:32PM -0400, Dan Sugalski wrote: P1-vtable_funcs[VTABLE_ADD + P2-num_type](P1, P2, P0); Uhm, since num_type and vtable_funcs are part of the vtable structure, that would be more like

Re: PMCs and how the opcode functions will work

2001-10-21 Thread Simon Cozens
On Mon, Oct 08, 2001 at 06:36:32PM -0400, Dan Sugalski wrote: num_type: 0, 1, 2, 3, 4, 5 for same as you, native int, bigint, native float, bigfloat, object P1-vtable_funcs[VTABLE_ADD + P2-num_type](P1, P2, P0); I don't understand the same as you thing; num_type isn't a

Re: PMCs and how the opcode functions will work

2001-10-21 Thread Dan Sugalski
At 02:59 PM 10/20/2001 +0100, Simon Cozens wrote: On Mon, Oct 08, 2001 at 06:36:32PM -0400, Dan Sugalski wrote: num_type: 0, 1, 2, 3, 4, 5 for same as you, native int, bigint, native float, bigfloat, object P1-vtable_funcs[VTABLE_ADD + P2-num_type](P1, P2, P0); I don't

Re: PMCs and how the opcode functions will work

2001-10-21 Thread Simon Cozens
On Wed, Oct 10, 2001 at 11:27:24AM +0200, Paolo Molaro wrote: ... and to go a step further in sanity and maintainability, I'd suggest using a structure with properly typed function pointers instead of an array: typedef void (*parrot_pmc_add) (PMC *dest, PMC *a, PMC *b); typedef void

Re: PMCs and how the opcode functions will work

2001-10-21 Thread Tom Hughes
In message [EMAIL PROTECTED] Simon Cozens [EMAIL PROTECTED] wrote: I've now changed the vtable structure to reflect this, but I'd like someone to confirm that the variant forms of the ops can be addressed the way I think they can. (ie. structure-base_element + 1 to get thing after

Re: PMCs and how the opcode functions will work

2001-10-21 Thread Jason Gloudon
On Sun, Oct 21, 2001 at 07:56:08PM +0100, Simon Cozens wrote: On Wed, Oct 10, 2001 at 11:27:24AM +0200, Paolo Molaro wrote: ... and to go a step further in sanity and maintainability, I'd suggest using a structure with properly typed function pointers instead of an array: typedef void

Re: PMCs and how the opcode functions will work

2001-10-18 Thread Simon Cozens
On Mon, Oct 08, 2001 at 06:36:32PM -0400, Dan Sugalski wrote: P1-vtable_funcs[VTABLE_ADD + P2-num_type](P1, P2, P0); Uhm, since num_type and vtable_funcs are part of the vtable structure, that would be more like P1-vtable-vtable_funcs[VTABLE_ADD + P2-vtable-num_type](P1, P2, P0);

Re: PMCs and how the opcode functions will work

2001-10-18 Thread Dan Sugalski
At 12:30 PM 10/18/2001 +0100, Simon Cozens wrote: On Mon, Oct 08, 2001 at 06:36:32PM -0400, Dan Sugalski wrote: P1-vtable_funcs[VTABLE_ADD + P2-num_type](P1, P2, P0); Uhm, since num_type and vtable_funcs are part of the vtable structure, that would be more like

Re: PMCs and how the opcode functions will work

2001-10-10 Thread Piers Cawley
Simon Cozens [EMAIL PROTECTED] writes: On Tue, Oct 09, 2001 at 11:50:55PM +0200, Benoit Cerrina wrote: It is clear that PMCs are object but does the acronym has a signification? Parrot Magic Cookie. Where can such things be found. In the documentation I'm in the middle of writing.

Re: PMCs and how the opcode functions will work

2001-10-10 Thread Simon Cozens
On Wed, Oct 10, 2001 at 06:51:24AM +0100, Piers Cawley wrote: Are we going to be officially calling this the Parrot Virtual Computer? What, Parrot? No, Parrot's called Parrot. -- I washed a sock. Then I put it in the dryer. When I took it out, it was gone. -- Steven Wright

Re: PMCs and how the opcode functions will work

2001-10-10 Thread Paolo Molaro
On 10/09/01 Dan Sugalski wrote: For sanity's sake, I don't suppose you'd consider typedef void* (*vtable_func_t)(); to make it vtable_func_t vtable_funcs[VTABLE_SIZE]; I'd be thrilled. Abstract types are A Good Thing. In fact, I'll go make it so right now. :) ... and to go a step

Re: PMCs and how the opcode functions will work

2001-10-10 Thread Steve Fink
Quoting Simon Cozens ([EMAIL PROTECTED]): On Tue, Oct 09, 2001 at 11:50:55PM +0200, Benoit Cerrina wrote: It is clear that PMCs are object but does the acronym has a signification? Parrot Magic Cookie. No matter how hard I try, my brain always expands it to Perl Meaty Chunk. It kinda fits,

Re: PMCs and how the opcode functions will work

2001-10-10 Thread Steve Fink
Quoting Dan Sugalski ([EMAIL PROTECTED]): Okay, here's a quick rundown on PMCs and how we're handling opcodes called on PMC registers. (This is mildly different than what's gone in the past, FWIW) Every PMC has a set of static types, stored in the vtable. These types are static, and stuck

Re: PMCs and how the opcode functions will work

2001-10-10 Thread Dan Sugalski
At 06:06 PM 10/9/2001 -0700, Steve Fink wrote: Quoting Simon Cozens ([EMAIL PROTECTED]): On Tue, Oct 09, 2001 at 11:50:55PM +0200, Benoit Cerrina wrote: It is clear that PMCs are object but does the acronym has a signification? Parrot Magic Cookie. No matter how hard I try, my brain

Re: PMCs and how the opcode functions will work

2001-10-10 Thread Dan Sugalski
At 11:27 AM 10/10/2001 +0200, Paolo Molaro wrote: On 10/09/01 Dan Sugalski wrote: For sanity's sake, I don't suppose you'd consider typedef void* (*vtable_func_t)(); to make it vtable_func_t vtable_funcs[VTABLE_SIZE]; I'd be thrilled. Abstract types are A Good Thing. In fact,

Re: PMCs and how the opcode functions will work

2001-10-09 Thread Michael G Schwern
On Mon, Oct 08, 2001 at 06:36:32PM -0400, Dan Sugalski wrote: Questions, anyone? ;-) Will there be a test on this? -- Michael G. Schwern [EMAIL PROTECTED]http://www.pobox.com/~schwern/ Perl6 Quality Assurance [EMAIL PROTECTED] Kwalitee Is Job One It sure is fun masturbating.

Re: PMCs and how the opcode functions will work

2001-10-09 Thread Simon Cozens
On Tue, Oct 09, 2001 at 04:03:13AM -0400, Michael G Schwern wrote: On Mon, Oct 08, 2001 at 06:36:32PM -0400, Dan Sugalski wrote: Questions, anyone? ;-) Will there be a test on this? Plenty, I hope, but isn't that your perview? :) -- fga is frequently given answers... the best are

Re: PMCs and how the opcode functions will work

2001-10-09 Thread Benoit Cerrina
Excuse me, It is clear that PMCs are object but does the acronym has a signification? Where can such things be found. Thank you Benoit

Re: PMCs and how the opcode functions will work

2001-10-09 Thread Brent Dax
Benoit Cerrina: #Excuse me, #It is clear that PMCs are #object but does the acronym #has a signification? Where #can such things be found. PMC eq Parrot Magic Cookie--a PMC is an opaque Thing whose actual value you don't care about.

Re: PMCs and how the opcode functions will work

2001-10-09 Thread Simon Cozens
On Tue, Oct 09, 2001 at 11:50:55PM +0200, Benoit Cerrina wrote: It is clear that PMCs are object but does the acronym has a signification? Parrot Magic Cookie. Where can such things be found. In the documentation I'm in the middle of writing. :) Simon -- Pretty, smart, sane:Pick two.

Re: PMCs and how the opcode functions will work

2001-10-09 Thread Dan Sugalski
At 06:08 PM 10/9/2001 -0700, Steve Fink wrote: Quoting Dan Sugalski ([EMAIL PROTECTED]): Okay, here's a quick rundown on PMCs and how we're handling opcodes called on PMC registers. (This is mildly different than what's gone in the past, FWIW) Every PMC has a set of static types, stored

Re: PMCs and how the opcode functions will work

2001-10-08 Thread Simon Cozens
On Mon, Oct 08, 2001 at 06:36:32PM -0400, Dan Sugalski wrote: PACKAGE *package; INTVAL base_type; INTVAL int_type; INTVAL float_type; INTVAL num_type; INTVAL string_type; Why are all these in the vtable? They seem like PMC-ish things to me. --

Re: PMCs and how the opcode functions will work

2001-10-08 Thread Dan Sugalski
At 12:00 AM 10/9/2001 +0100, Simon Cozens wrote: On Mon, Oct 08, 2001 at 06:36:32PM -0400, Dan Sugalski wrote: PACKAGE *package; INTVAL base_type; INTVAL int_type; INTVAL float_type; INTVAL num_type; INTVAL string_type; Why are all these in