Changes between Version 1 and Version 2 of C3 linearization

Show
Ignore:
Timestamp:
02/10/10 07:36:35 (5 years ago)
Author:
Austin_Hastings
Comment:

Added source links

Legend:

Unmodified
Added
Removed
Modified
  • C3 linearization

    v1 v2  
    1717== C3 Avoidance == 
    1818 
    19 In most cases, C3 can be avoided. If a class has no parent ('''very''' infrequent) or if a class has only one parent (very common - this is single inheritance) then the MRO computation is trivial. The MRO of a root class is a list of the class itself. The MRO of a class with one parent is the parent's MRO with the child class added. 
     19In most cases, C3 can be avoided. (See source:/trunk/src/pmc/class.pmc#L430) If a class has no parent ('''very''' infrequent) or if a class has only one parent (very common - this is single inheritance) then the MRO computation is trivial. The MRO of a root class is a list of the class itself. The MRO of a class with one parent is the parent's MRO with the child class added. 
    2020 
    2121{{{ 
     
    4646=== C3_merge === 
    4747 
    48 `C3_merge` identifies a valid candidate class, searching in a particular order. The ''first'' valid candidate is considered the "next" entry in the MRO. All references to that candidate are removed from the search arena, and the function calls itself recursively. 
     48`C3_merge` (see source:/trunk/src/oo.c#L1109) identifies a valid candidate class, searching in a particular order. The ''first'' valid candidate is considered the "next" entry in the MRO. All references to that candidate are removed from the search arena, and the function calls itself recursively. 
    4949 
    5050==== Find a candidate class ====