Class: Kumi::Core::Analyzer::Passes::Loop::LowerPass

Inherits:
IRLowerPass show all
Defined in:
lib/kumi/core/analyzer/passes/loop/lower_pass.rb

Constant Summary

Constants inherited from PassBase

PassBase::HALT

Instance Method Summary collapse

Methods inherited from IRLowerPass

lowers

Methods inherited from PassBase

contract_declared?, #debug, #debug_enabled?, declared_optional_reads, declared_reads, declared_writes, #initialize, optional_reads, reads, writes

Methods included from ErrorReporting

#inferred_location, #raise_localized_error, #raise_syntax_error, #raise_type_error, #report_enhanced_error, #report_error, #report_semantic_error, #report_syntax_error, #report_type_error

Constructor Details

This class inherits a constructor from Kumi::Core::Analyzer::Passes::PassBase

Instance Method Details

#run(errors) ⇒ Object

The loop lowering can hit a genuine “valid schema, unsupported construct” wall (e.g. cross(…) over a computed value). Those are raised as UnsupportedFeature; catch them here and surface as a clean, accumulated pass failure rather than letting PassManager re-raise them as an “internal compiler error (please report)”.



18
19
20
21
22
# File 'lib/kumi/core/analyzer/passes/loop/lower_pass.rb', line 18

def run(errors)
  super
rescue Kumi::Core::Errors::UnsupportedFeature => e
  halt_pass!(errors, e.message)
end