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