Re: Another object bug

2004-03-16 Thread James Mastros
Dan Sugalski wrote: At 5:16 PM -0700 2/26/04, Luke Palmer wrote: And how do we deal with an object already in existence when the base object gets an attribute added? After that, we post a notification to all child classes and walk through the PMC pools inserting the new attribute in the proper

Re: Another object bug

2004-02-27 Thread Dan Sugalski
At 5:16 PM -0700 2/26/04, Luke Palmer wrote: Dan Sugalski writes: At 2:38 PM +0100 2/26/04, Leopold Toetsch wrote: Simplifies compilers: newclass P1, Foo addattribute P1, i findclass I1, Foo new P2, I1 classoffset I2, P2 In static cases, where P2 is known to be a

Re: Another object bug

2004-02-26 Thread Luke Palmer
Leopold Toetsch writes: Dan Sugalski [EMAIL PROTECTED] wrote: At 4:54 PM -0500 2/25/04, Simon Glover wrote: If I'm understanding the docs correctly, this should print '0'. Instead, it prints 'Array index out of bounds!' Another bug, though the offset ought to be 2 right now.

Re: Another object bug

2004-02-26 Thread Dan Sugalski
At 8:10 AM +0100 2/26/04, Leopold Toetsch wrote: Dan Sugalski [EMAIL PROTECTED] wrote: At 4:54 PM -0500 2/25/04, Simon Glover wrote: If I'm understanding the docs correctly, this should print '0'. Instead, it prints 'Array index out of bounds!' Another bug, though the offset ought to be 2

Re: Another object bug

2004-02-26 Thread Dan Sugalski
At 2:38 PM +0100 2/26/04, Leopold Toetsch wrote: Dan Sugalski [EMAIL PROTECTED] wrote: At 8:10 AM +0100 2/26/04, Leopold Toetsch wrote: *Please* don't. Cclassoffset (and attribute access) should by all means start with 0. Why? Simplifies compilers: newclass P1, Foo addattribute P1, i

Re: Another object bug

2004-02-26 Thread Dan Sugalski
At 10:03 AM -0500 2/26/04, Simon Glover wrote: On Thu, 26 Feb 2004, Dan Sugalski wrote: At 2:38 PM +0100 2/26/04, Leopold Toetsch wrote: Dan Sugalski [EMAIL PROTECTED] wrote: At 8:10 AM +0100 2/26/04, Leopold Toetsch wrote: \No, it won't. No code should ever assume an absolute offset.

Re: Another object bug

2004-02-26 Thread Luke Palmer
Dan Sugalski writes: At 2:38 PM +0100 2/26/04, Leopold Toetsch wrote: Simplifies compilers: newclass P1, Foo addattribute P1, i findclass I1, Foo new P2, I1 classoffset I2, P2 In static cases, where P2 is known to be a CFoo, attrib #0 (i) would be always 0. That

Re: Another object bug

2004-02-26 Thread Simon Glover
On Thu, 26 Feb 2004, Dan Sugalski wrote: At 10:03 AM -0500 2/26/04, Simon Glover wrote: On Thu, 26 Feb 2004, Dan Sugalski wrote: like t/pmc/objects.t? I was waiting for you to pull that out. :) Yes, objects.t assumes some evil low-level knowledge of the internals. Well, in

Re: Another object bug

2004-02-26 Thread Simon Glover
On Thu, 26 Feb 2004, Dan Sugalski wrote: At 2:38 PM +0100 2/26/04, Leopold Toetsch wrote: Dan Sugalski [EMAIL PROTECTED] wrote: At 8:10 AM +0100 2/26/04, Leopold Toetsch wrote: *Please* don't. Cclassoffset (and attribute access) should by all means start with 0. Why? Simplifies

Re: Another object bug

2004-02-26 Thread Leopold Toetsch
Dan Sugalski [EMAIL PROTECTED] wrote: At 8:10 AM +0100 2/26/04, Leopold Toetsch wrote: *Please* don't. Cclassoffset (and attribute access) should by all means start with 0. Why? Simplifies compilers: newclass P1, Foo addattribute P1, i findclass I1, Foo new P2, I1

Another object bug

2004-02-25 Thread Simon Glover
If I'm understanding the docs correctly, this should print '0'. Instead, it prints 'Array index out of bounds!' newclass P1, Foo addattribute P1, i find_type I0, Foo new P2, I0 classoffset I1, P2, Foo print I1 print \n end Simon

Re: Another object bug

2004-02-25 Thread Dan Sugalski
At 4:54 PM -0500 2/25/04, Simon Glover wrote: If I'm understanding the docs correctly, this should print '0'. Instead, it prints 'Array index out of bounds!' Another bug, though the offset ought to be 2 right now. (Attributes 0 and 1 are taken by other things so they're valid) --

Re: Another object bug

2004-02-25 Thread Simon Glover
On Wed, 25 Feb 2004, Dan Sugalski wrote: At 4:54 PM -0500 2/25/04, Simon Glover wrote: If I'm understanding the docs correctly, this should print '0'. Instead, it prints 'Array index out of bounds!' Another bug, though the offset ought to be 2 right now. (Attributes 0 and 1 are taken

Re: Another object bug

2004-02-25 Thread Dan Sugalski
At 6:42 PM -0500 2/25/04, Simon Glover wrote: On Wed, 25 Feb 2004, Dan Sugalski wrote: At 4:54 PM -0500 2/25/04, Simon Glover wrote: If I'm understanding the docs correctly, this should print '0'. Instead, it prints 'Array index out of bounds!' Another bug, though the offset ought to be 2

Re: Another object bug

2004-02-25 Thread Leopold Toetsch
Dan Sugalski [EMAIL PROTECTED] wrote: At 4:54 PM -0500 2/25/04, Simon Glover wrote: If I'm understanding the docs correctly, this should print '0'. Instead, it prints 'Array index out of bounds!' Another bug, though the offset ought to be 2 right now. (Attributes 0 and 1 are taken by other