1 AST Node Annotations
2 ====================
3
4 These annotations are defined in the revised compiler.ast classes.
5
6 Deduction Results
7 -----------------
8
9 _access_type defines the kind of access involved for a particular node
10 and determines which of the following annotations will be
11 employed
12 _value_deduced defines a specific result associated with an attribute
13 access during deduction and based on inspection results
14 _attr_deduced defines an attribute result according to deduction based
15 on inspection results, with the accessor being the parent
16 defined in this object for static attributes
17 _position_deduced defines a common position employed by all deduced
18 attributes for an access operation which is relative to
19 the accessor evaluated at run time
20 _set_context indicates the deduced effect on the context in an access
21 operation, whether the context would be replaced
22 unconditionally or conditionally
23
24 _attrs_deduced_from_usage
25 _attrs_deduced
26 provided as additional annotations more suitable for
27 report generation than code generation, since they
28 describe a range of deduced attributes for a given node,
29 but such ranges may not lend themselves to the generation
30 of optimised code
31
32 Evaluation Results
33 ------------------
34
35 _attr notes the result associated with an attribute access
36 operation during inspection; this may be a general
37 instance providing no specific information about the
38 nature of an attribute
39 _expr records the result of evaluating an expression used in an
40 attribute access operation
41
42 Attribute Users
43 ---------------
44
45 _attrtypes defines types deduced either from combined attribute usage
46 details (for users)
47
48 Attribute Contributors
49 ----------------------
50
51 _attrnames defines a dictionary mapping local names to sets of
52 attribute names found to be used with those names in a
53 branch
54 _attrbranches indicates the immediate contributors to attribute usage
55 known to a node
56 _attrcontributors defines nodes contributing to combined attribute usage known
57 to a node
58 _attrcombined defines a dictionary mapping local names to sets of
59 attribute names found to be used with those names for the
60 entire lifetime of a particular attribute user
61 _attrmerged defines a dictionary mapping local names to sets of
62 attribute names merging combined observations with locally
63 applicable observations, indicating usage specific to a
64 region of the code
65 _attrspecifictypes defines specific types from merged attribute usage details
66 (for non-user nodes)
67 _attrdefs defines definition-related users which consume usage details
68 from the node
69
70 Attribute Accessors
71 -------------------
72
73 _attrusers defines a dictionary mapping local names to sets of nodes
74 defining those names
75 _username indicates the name of the attribute user involved in an
76 access operation
77
78 Name Accessors
79 --------------
80
81 _scope set as "constant", "local", "global" or "builtins"
82
83 Program Units
84 -------------
85
86 unit refers to a micropython Class, Function or Module instance