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@59 | 1 | #!/usr/bin/env python |
paul@59 | 2 | |
paul@59 | 3 | class C: |
paul@137 | 4 | def __init__(self, x): |
paul@137 | 5 | pass |
paul@137 | 6 | |
paul@59 | 7 | def f(self, a, b, c): |
paul@86 | 8 | self.g(a) |
paul@87 | 9 | m = self.g |
paul@87 | 10 | m(b) |
paul@86 | 11 | |
paul@86 | 12 | def g(self, x): |
paul@86 | 13 | C.h(self, x) |
paul@86 | 14 | |
paul@86 | 15 | def h(self, p): |
paul@59 | 16 | pass |
paul@59 | 17 | |
paul@137 | 18 | c = C(123) |
paul@59 | 19 | c.f(1, 2, 3) |
paul@59 | 20 | |
paul@59 | 21 | f = c.f |
paul@59 | 22 | f(1, 2, 3) |
paul@59 | 23 | |
paul@59 | 24 | # vim: tabstop=4 expandtab shiftwidth=4 |