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
37 _expr records the result of evaluating an expression used in an
38 attribute access operation
39
40 Attribute Users
41 ---------------
42
43 _attrtypes defines types deduced either from combined attribute usage
44 details (for users)
45
46 Attribute Contributors
47 ----------------------
48
49 _attrnames defines a dictionary mapping local names to sets of
50 attribute names found to be used with those names in a
51 branch
52 _attrbranches indicates the immediate contributors to attribute usage
53 known to a node
54 _attrcontributors defines nodes contributing to combined attribute usage known
55 to a node
56 _attrcombined defines a dictionary mapping local names to sets of
57 attribute names found to be used with those names for the
58 entire lifetime of a particular attribute user
59 _attrmerged defines a dictionary mapping local names to sets of
60 attribute names merging combined observations with locally
61 applicable observations, indicating usage specific to a
62 region of the code
63 _attrspecifictypes defines specific types from merged attribute usage details
64 (for non-user nodes)
65 _attrdefs defines definition-related users which consume usage details
66 from the node
67
68 Attribute Accessors
69 -------------------
70
71 _attrusers defines a dictionary mapping local names to sets of nodes
72 defining those names
73 _username indicates the name of the attribute user involved in an
74 access operation
75
76 Name Accessors
77 --------------
78
79 _scope set as "constant", "local", "global" or "builtins"
80
81 Program Units
82 -------------
83
84 unit refers to a micropython Class, Function or Module instance