2009-04-26 | Paul Boddie | file changeset files shortlog | Fixed basestring.__radd__ duplication. Fixed the StoreTemp RSVP instruction (which uses the current value). Removed various unnecessary default objects. Removed code generation of instantiators for built-in classes. Removed direct calling of __init__ methods where class invocation is detected. Introduced a size member to object headers which may be overridden by the MakeObject instruction. Added RSVP support for the list instantiator. Added empty and minimal test programs. |
paul@109 | 1 | #!/usr/bin/env python |
paul@109 | 2 | |
paul@109 | 3 | class C: |
paul@109 | 4 | pass |
paul@109 | 5 | |
paul@109 | 6 | class D: |
paul@109 | 7 | def __init__(self): |
paul@109 | 8 | pass |
paul@109 | 9 | |
paul@110 | 10 | class E: |
paul@110 | 11 | def __init__(self, x): |
paul@110 | 12 | pass |
paul@110 | 13 | |
paul@137 | 14 | class F: |
paul@137 | 15 | def __init__(self, x=1): |
paul@137 | 16 | pass |
paul@137 | 17 | |
paul@109 | 18 | c = C() |
paul@137 | 19 | X = C |
paul@137 | 20 | x = X() |
paul@109 | 21 | d = D() |
paul@110 | 22 | e = E(1) |
paul@137 | 23 | f = F() |
paul@137 | 24 | f = F(2) |
paul@137 | 25 | X = F |
paul@137 | 26 | x = X() |
paul@109 | 27 | |
paul@109 | 28 | # vim: tabstop=4 expandtab shiftwidth=4 |