AnalysisResult class
Defined in module l0_analysis (l0_analysis.py).
Full front-end analysis result for an entry module.
Public static attributes
- static CompilationUnit 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.