Changes between Version 1 and Version 2 of ClassVtableOverrides

Show
Ignore:
Timestamp:
11/20/09 22:27:06 (12 years ago)
Author:
chromatic
Comment:

formatting improvements

Legend:

Unmodified
Added
Removed
Modified
  • ClassVtableOverrides

    v1 v2  
    77For this trick, we need: 
    88 
    9 * a comprehensive set of VTABLE entries which *only* dispatch to the given PMC Object's Class's PIR VTABLE override 
    10 * a way of mapping the name of a VTABLE entry (passed to add_vtable_override()) to the appropriate slot in the fake VTABLE 
    11 * a way of swapping the standard Object VTABLE for a custom VTABLE for all Object PMCs created by the instantiate() of a Class with overridden VTABLE entries 
    12 * (likely) a way of identifying whether any *parent* Class in a Class's MRO has overridden VTABLE entries 
     9  * a comprehensive set of VTABLE entries which *only* dispatch to the given PMC Object's Class's PIR VTABLE override 
     10  * a way of mapping the name of a VTABLE entry (passed to add_vtable_override()) to the appropriate slot in the fake VTABLE 
     11  * a way of swapping the standard Object VTABLE for a custom VTABLE for all Object PMCs created by the instantiate() of a Class with overridden VTABLE entries 
     12  * (likely) a way of identifying whether any *parent* Class in a Class's MRO has overridden VTABLE entries 
    1313 
    1414Thus every time something adds a new VTABLE entry to a Class, add_vtable_override() copies the current object VTABLE, swaps in the appropriate "dispatch to the PIR entry instead" VTABLE entry, and uses that new VTABLE for all Objects instantiated from that Class.