#218: can't sort a PIR subclass of an RPA.
-------------------------+--------------------------------------------------
 Reporter:  coke         |        Owner:  whiteknight
     Type:  bug          |       Status:  reopened   
 Priority:  normal       |    Milestone:  1.1        
Component:  core         |      Version:             
 Severity:  high         |   Resolution:             
 Keywords:  tcl blocker  |         Lang:             
    Patch:               |     Platform:  all        
-------------------------+--------------------------------------------------

Comment(by pmichaud):

 On Wed, Apr 22, 2009 at 11:07:38PM -0000, Parrot wrote:
 >  2) Remove the set_addr opcode entirely.
 >  3) Change the get_addr opcode to return the memory address of the PMC
 >  passed into it. This is needed by Rakudo at least, and probably by
 other
 >  HLLs as well eventually.

 Rakudo doesn't specifically have to have the memory address -- it just
 needs something it can return from .WHICH() to uniquely identify a PMC
 that is being used as a container.  (The memory address is an obvious
 choice,
 however.)

 >  4) Change FixedPMCArray (and maybe other array PMCs) to use get_pointer
 to
 >  return a pointer to the underlying C array. This will improve
 >  encapsulation and allow subclassed types to inherit the sort() method
 >  properly.

 This last part sounds wrong to me.  Why would a subclassed type need to
 get
 to the underlying C array to be able to use sort in the first place?
 The sort() method in the base class should know to use that (private)
 array from the base class, regardless of any subclassing taking place.

 Pm

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/218#comment:17>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets

Reply via email to