1.1 --- a/docs/annotations.txt Thu Mar 13 23:10:25 2014 +0100
1.2 +++ b/docs/annotations.txt Thu Mar 13 23:54:49 2014 +0100
1.3 @@ -6,6 +6,9 @@
1.4 Deduction Results
1.5 -----------------
1.6
1.7 +_access_attrs the deduced attributes involved in an access, or None;
1.8 + details of the deductions are given in the following
1.9 + annotations
1.10 _access_type ("constant", "static", "positioned", "instance",
1.11 "impossible")
1.12 defines the kind of access involved for a particular node
2.1 --- a/micropython/deduce.py Thu Mar 13 23:10:25 2014 +0100
2.2 +++ b/micropython/deduce.py Thu Mar 13 23:54:49 2014 +0100
2.3 @@ -272,12 +272,16 @@
2.4 if not node._expr or isinstance(node._expr, Instance):
2.5 node._expr = expr_type
2.6
2.7 - # The target, on which the access is performed, may influence the effect
2.8 - # on the context. We can only reliably assume that a literal constant is
2.9 - # an instance: all other "instances" may actually be classes in certain
2.10 - # cases.
2.11 + self._annotateAttr(node, node._expr, node.attrname)
2.12 +
2.13 + # Make a summary annotation of the deductions.
2.14
2.15 - self._annotateAttr(node, node._expr, node.attrname)
2.16 + attributes = node._value_deduced and [self.get_attribute_and_value(node._value_deduced)] or \
2.17 + node._attr_deduced and [self.get_attribute_and_value(node._attr_deduced)] or \
2.18 + node._attrs_deduced or \
2.19 + map(self.get_attribute_and_value, node._attrs_deduced_from_specific_usage or [])
2.20 +
2.21 + node._access_attrs = attributes
2.22
2.23 def _annotateAttr(self, node, target, attrname):
2.24
2.25 @@ -288,6 +292,11 @@
2.26
2.27 unit = self.get_unit()
2.28
2.29 + # The target, on which the access is performed, may influence the effect
2.30 + # on the context. We can only reliably assume that a literal constant is
2.31 + # an instance: all other "instances" may actually be classes in certain
2.32 + # cases.
2.33 +
2.34 instance_target = isinstance(target, TypedInstance)
2.35 typed_instance_attr = isinstance(target, BaseAttr) and isinstance(target.get_value(), TypedInstance)
2.36 self_access = self.provides_self_access(target, unit)
3.1 --- a/micropython/report.py Thu Mar 13 23:10:25 2014 +0100
3.2 +++ b/micropython/report.py Thu Mar 13 23:54:49 2014 +0100
3.3 @@ -95,6 +95,7 @@
3.4
3.5 .impossible-guard,
3.6 .impossible-guard .name,
3.7 + .impossible-guard .name:hover,
3.8 .no-attributes {
3.9 background-color: #d00;
3.10 color: white;