2008-08-03 | Paul Boddie | file changeset files shortlog | Changed the treatment of boolean status (for tests and conditional jumps) such that a special status register would be involved and that the current value would be preserved. Added a LoadBoolean instruction, which loads the boolean status into the current value (using the appropriate object). Changed temporary storage usage for lambda definitions with default values, removing the ensure_temp method. Re-introduced and cleaned up temporary storage usage (and local usage) attributes for program units. |
paul@46 | 1 | #!/usr/bin/env python |
paul@46 | 2 | |
paul@46 | 3 | class A: |
paul@46 | 4 | def __init__(self, x): |
paul@46 | 5 | self.x = x |
paul@46 | 6 | |
paul@46 | 7 | def a(self): |
paul@46 | 8 | pass |
paul@46 | 9 | |
paul@46 | 10 | class B(A): |
paul@46 | 11 | def b(self): |
paul@46 | 12 | pass |
paul@46 | 13 | |
paul@46 | 14 | class C(A, B): |
paul@49 | 15 | def a(self): |
paul@49 | 16 | pass |
paul@49 | 17 | |
paul@49 | 18 | def b(self): |
paul@49 | 19 | pass |
paul@49 | 20 | |
paul@46 | 21 | def __init__(self, x, y): |
paul@46 | 22 | self.x = x |
paul@46 | 23 | self.y = y |
paul@46 | 24 | |
paul@46 | 25 | class D: |
paul@46 | 26 | def __init__(self, y): |
paul@46 | 27 | self.y = y |
paul@46 | 28 | |
paul@46 | 29 | class E(C, D): |
paul@46 | 30 | pass |
paul@46 | 31 | |
paul@46 | 32 | class F(A, D): |
paul@46 | 33 | pass |
paul@46 | 34 | |
paul@46 | 35 | # vim: tabstop=4 expandtab shiftwidth=4 |