1.1 --- a/docs/optimisations.txt Mon Oct 26 01:03:38 2009 +0100
1.2 +++ b/docs/optimisations.txt Tue Oct 27 00:23:28 2009 +0100
1.3 @@ -224,7 +224,16 @@
1.4 the earliest opportunity and then specialise the attribute accesses, perhaps
1.5 also invocations, in the generated code. AttributeError occurrences would need
1.6 to be considered, however, potentially disqualifying certain attributes from
1.7 -any optimisations, and control flow would also need to be considered.
1.8 +any optimisations, and control flow would also need to be considered. The
1.9 +result would resemble the following:
1.10 +
1.11 + def f(x, y):
1.12 + if not isinstance(x, C):
1.13 + raise TypeError
1.14 + x.method(y)
1.15 + if x.something:
1.16 + ...
1.17 + return x.attr
1.18
1.19 Implemented Optimisation Types
1.20 ==============================