2008-04-27 | Paul Boddie | file changeset files shortlog | Changed the accounting of temporary storage locations so that instructions can be generated referring to specific locations. Fixed default parameter value code generation, moving the generation inside the Translation class handler for Function nodes. Added a test of operators. |
paul@73 | 1 | #!/usr/bin/env python |
paul@73 | 2 | |
paul@73 | 3 | def f(a, b, c=a+b): |
paul@73 | 4 | return a + b |
paul@73 | 5 | |
paul@73 | 6 | a = 1 |
paul@73 | 7 | b = 2 |
paul@73 | 8 | c = a + b |
paul@73 | 9 | |
paul@73 | 10 | # vim: tabstop=4 expandtab shiftwidth=4 |