AnalysisResult class
Defined in module l0_analysis (l0_analysis.py).
Full front-end analysis result for an entry module.
Public static attributes
- static Optional cu
- static CompilationContext context
- static Dict module_envs
- static Dict func_types
- static Dict struct_infos
- static Dict enum_infos
- static Dict func_envs
- static Dict let_types
- static Dict expr_types
- static Dict var_ref_resolution
- static Dict intrinsic_targets
- static List diagnostics
Public functions
- auto has_errors(self) -> bool
- Check if any 'error' diagnostics were reported.
- auto has_warnings(self) -> bool
- Check if any 'warning' diagnostics were reported.
- auto is_arc_type(self, Type ty) -> bool
- Check if a type requires Automatic Reference Counting (ARC).
- auto has_arc_data(self, Type typ) -> bool
- Check if a type transitively contains ARC-managed data.
Function documentation
bool l0_analysis:: AnalysisResult:: has_errors(self)
Check if any 'error' diagnostics were reported.
| Returns | True if at least one error exists, False otherwise. |
|---|
bool l0_analysis:: AnalysisResult:: has_warnings(self)
Check if any 'warning' diagnostics were reported.
| Returns | True if at least one warning exists, False otherwise. |
|---|
bool l0_analysis:: AnalysisResult:: is_arc_type(self,
Type ty)
Check if a type requires Automatic Reference Counting (ARC).
| Parameters | |
|---|---|
| ty | The type to check. |
| Returns | True if the type is managed by ARC, False otherwise. |
Currently, only the 'string' builtin type requires ARC.
bool l0_analysis:: AnalysisResult:: has_arc_data(self,
Type typ)
Check if a type transitively contains ARC-managed data.
| Parameters | |
|---|---|
| typ | The type to check. |
| Returns | True if the type or any of its components are managed by ARC, False otherwise. |
This is used to determine if a value of this type requires retain/release orchestration during assignment or when going out of scope.