2016-10-14 | Paul Boddie | raw annotate files changeset graph | Introduced access mode information for unambiguously-traversed attributes so that the appropriate instruction can be generated. Removed the generation of augmented attribute access plans and the computation of general attribute position ambiguity, since the information will not be used: in cases where ambiguity might need to be determined, attributes must be checked to determine their exact nature even if unambiguous. |
1 class C: 2 def __init__(self): 3 self.a = 1 4 5 b = 2 6 7 class D: 8 def __init__(self): 9 self.a = 3 10 self.b = 4 11 12 class E: 13 a = 5 14 b = 6 15 16 def f(x): 17 return x.a, x.b 18 19 c = C() 20 d = D() 21 e = E() 22 23 result1 = f(c) # (1, 2) 24 result2 = f(d) # (3, 4) 25 result3 = f(e) # (5, 6)